source: mainline/uspace/lib/c/include/io/log.h@ cd1e3fc0

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
RevLine 
[9b415c9]1/*
[d7f7a4a]2 * SPDX-FileCopyrightText: 2011 Vojtech Horky
3 * SPDX-FileCopyrightText: 2011 Jiri Svoboda
[9b415c9]4 *
[d7f7a4a]5 * SPDX-License-Identifier: BSD-3-Clause
[9b415c9]6 */
7
8/** @addtogroup libc
9 * @{
10 */
11
[4805495]12#ifndef _LIBC_IO_LOG_H_
13#define _LIBC_IO_LOG_H_
[9b415c9]14
[fc51296]15#include <stdarg.h>
[793cce15]16#include <inttypes.h>
[aa492fe]17#include <io/verify.h>
[cf13b17]18#include <types/common.h>
[fc51296]19
[91db0280]20#include <abi/log.h>
[9b415c9]21
[e0c836e8]22/** Log itself (logging target). */
[d6ddeb7]23typedef sysarg_t log_t;
[e0c836e8]24/** Formatting directive for printing log_t. */
[793cce15]25#define PRIlogctx PRIxn
[e0c836e8]26
27/** Default log (target). */
[f039dba]28#define LOG_DEFAULT ((log_t) -1)
[e0c836e8]29
30/** Use when creating new top-level log. */
[f039dba]31#define LOG_NO_PARENT ((log_t) 0)
[793cce15]32
[1c67b41]33extern const char *log_level_str(log_level_t);
[b7fd2a0]34extern errno_t log_level_from_str(const char *, log_level_t *);
[1c67b41]35
[b7fd2a0]36extern errno_t log_init(const char *);
[2bf781a]37extern log_t log_create(const char *, log_t);
[793cce15]38
[70253688]39extern void log_msg(log_t, log_level_t, const char *, ...)
[09d13c8e]40 _HELENOS_PRINTF_ATTRIBUTE(3, 4);
[a1a101d]41extern void log_msgv(log_t, log_level_t, const char *, va_list);
[9b415c9]42
43#endif
44
45/** @}
46 */
Note: See TracBrowser for help on using the repository browser.