|
Last change
on this file since cd1e3fc0 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
|
Replace some license headers with SPDX identifier
Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.
|
-
Property mode
set to
100644
|
|
File size:
992 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2011 Vojtech Horky
|
|---|
| 3 | * SPDX-FileCopyrightText: 2011 Jiri Svoboda
|
|---|
| 4 | *
|
|---|
| 5 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /** @addtogroup libc
|
|---|
| 9 | * @{
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | #ifndef _LIBC_IO_LOG_H_
|
|---|
| 13 | #define _LIBC_IO_LOG_H_
|
|---|
| 14 |
|
|---|
| 15 | #include <stdarg.h>
|
|---|
| 16 | #include <inttypes.h>
|
|---|
| 17 | #include <io/verify.h>
|
|---|
| 18 | #include <types/common.h>
|
|---|
| 19 |
|
|---|
| 20 | #include <abi/log.h>
|
|---|
| 21 |
|
|---|
| 22 | /** Log itself (logging target). */
|
|---|
| 23 | typedef sysarg_t log_t;
|
|---|
| 24 | /** Formatting directive for printing log_t. */
|
|---|
| 25 | #define PRIlogctx PRIxn
|
|---|
| 26 |
|
|---|
| 27 | /** Default log (target). */
|
|---|
| 28 | #define LOG_DEFAULT ((log_t) -1)
|
|---|
| 29 |
|
|---|
| 30 | /** Use when creating new top-level log. */
|
|---|
| 31 | #define LOG_NO_PARENT ((log_t) 0)
|
|---|
| 32 |
|
|---|
| 33 | extern const char *log_level_str(log_level_t);
|
|---|
| 34 | extern errno_t log_level_from_str(const char *, log_level_t *);
|
|---|
| 35 |
|
|---|
| 36 | extern errno_t log_init(const char *);
|
|---|
| 37 | extern log_t log_create(const char *, log_t);
|
|---|
| 38 |
|
|---|
| 39 | extern void log_msg(log_t, log_level_t, const char *, ...)
|
|---|
| 40 | _HELENOS_PRINTF_ATTRIBUTE(3, 4);
|
|---|
| 41 | extern void log_msgv(log_t, log_level_t, const char *, va_list);
|
|---|
| 42 |
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | /** @}
|
|---|
| 46 | */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.