libosmocore  1.12.0.59-e9cb.202601311800
Osmocom core library
logging_internal.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include <stdbool.h>
8 #include <osmocom/core/logging.h>
9 #include <osmocom/core/utils.h>
10 
11 /* maximum length of the log string of a single log event (typically line) */
12 #define MAX_LOG_SIZE 4096
13 
15  /* Whether we are inside a code path to generate logging output: */
17  /* Cache TID: */
18  long int tid;
19 };
20 
21 extern void *tall_log_ctx;
22 extern struct log_info *osmo_log_info;
23 extern const struct value_string loglevel_strs[];
24 extern struct llist_head osmo_log_target_list;
25 extern __thread struct log_thread_state log_thread_state;
26 
27 void assert_loginfo(const char *src);
28 
29 int log_output_buf(char *buf, int buf_len, struct log_target *target, unsigned int subsys,
30  unsigned int level, const char *file, int line, int cont,
31  const char *format, va_list ap);
32 
33 void log_target_file_destroy(struct log_target *target);
34 
write Write running configuration to or terminal n Write configuration to the file(same as write file)\n") ALIAS(config_write_file
void * tall_log_ctx
Definition: logging.c:84
struct log_info * osmo_log_info
Definition: logging.c:81
struct llist_head osmo_log_target_list
int log_output_buf(char *buf, int buf_len, struct log_target *target, unsigned int subsys, unsigned int level, const char *file, int line, int cont, const char *format, va_list ap)
main output formatting function for log lines.
Definition: logging.c:563
void assert_loginfo(const char *src)
Definition: logging.c:398
void log_target_file_destroy(struct log_target *target)
Definition: logging_file.c:91
const struct value_string loglevel_strs[]
Definition: logging.c:213
char subsys[16]
logging sub-system
Definition: gsmtap.h:9
uint8_t level
logging level
Definition: gsmtap.h:6
(double) linked list header structure
Definition: linuxlist.h:46
Logging configuration, passed to log_init.
Definition: logging.h:259
Definition: logging.h:303
Definition: logging_internal.h:14
bool logging_active
Definition: logging_internal.h:16
long int tid
Definition: logging_internal.h:18
A mapping between human-readable string and numeric value.
Definition: utils.h:51