log.h
Go to the documentation of this file.
1/*
2 * $COPYRIGHT-BEGIN$
3 * libasterix
4 * Copyright [2013-2026] SinoATC <http://www.sinoatc.com>.
5 * All Rights Reserved.
6 *
7 * NOTICE: All information contained herein is, and remains
8 * the property of SinoATC and its suppliers, if any.
9 * The intellectual and technical concepts contained herein
10 * are proprietary to SinoATC and its suppliers and may be
11 * covered by U.S. and Foreign Patents, patents in process,
12 * and are protected by trade secret or copyright law.
13 * Dissemination of this information or reproduction of this material
14 * is strictly forbidden unless prior written permission is obtained
15 * from SinoATC.
16 * $COPYRIGHT-END$
17 */
18
24
25#ifndef LIBASTERIX_LOG_H
26#define LIBASTERIX_LOG_H
27
28#include "platform.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
43
45#define AST_MAX_LOG_MESSAGE_SIZE 512
46
49typedef void (*ast_log_handler_func_t)(ast_log_level_t level, const char* message);
50
54
57AST_API void ast_log_stdout(ast_log_level_t level, const char* message);
58
59#ifdef __cplusplus
60 }
61#endif // extern "C"
62
63#endif //LIBASTERIX_LOG_H
64
65// vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
void ast_log_stdout(ast_log_level_t level, const char *message)
Log handler that will print message to stdout.
void ast_log_handler_reg(const ast_log_handler_func_t func)
Register log handler callback function.
ast_log_level_t
Log Level.
Definition log.h:36
@ AST_LOG_CRITICAL
Error that will cause cause decoding/encoding fail.
Definition log.h:40
@ AST_LOG_PANIC
Error that will cause library crash.
Definition log.h:41
@ AST_LOG_WARNING
Non important errors.
Definition log.h:39
@ AST_LOG_INFO
General information message.
Definition log.h:38
@ AST_LOG_DEBUG
Messages that will only be shown in debug build.
Definition log.h:37
void(* ast_log_handler_func_t)(ast_log_level_t level, const char *message)
Function prototype of log handler callback.
Definition log.h:49
This file includes platform specific definitions.
#define AST_API
Definition platform.h:63