xref: /dpdk/lib/log/log_internal.h (revision 62ae1149f2bdaed3482abb08f2e255f1ac4746e7)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2021 Mellanox Technologies, Ltd
3  */
4 
5 #ifndef LOG_INTERNAL_H
6 #define LOG_INTERNAL_H
7 
8 #include <stdbool.h>
9 #include <stdio.h>
10 #include <stdint.h>
11 #include <time.h>
12 
13 #include <rte_compat.h>
14 
15 /*
16  * Initialize the default log stream.
17  */
18 __rte_internal
19 void eal_log_init(const char *id);
20 
21 /*
22  * Save a log option for later.
23  */
24 __rte_internal
25 int eal_log_save_regexp(const char *regexp, uint32_t level);
26 __rte_internal
27 int eal_log_save_pattern(const char *pattern, uint32_t level);
28 
29 __rte_internal
30 int eal_log_syslog(const char *name);
31 
32 /*
33  * Convert log level to string.
34  */
35 __rte_internal
36 const char *eal_log_level2str(uint32_t level);
37 
38 /*
39  * Close the default log stream
40  */
41 __rte_internal
42 void rte_eal_log_cleanup(void);
43 
44 /*
45  * Add timestamp to console logs
46  */
47 __rte_internal
48 int eal_log_timestamp(const char *fmt);
49 
50 
51 #endif /* LOG_INTERNAL_H */
52