Motr  M0
logger.c File Reference
#include "motr/m0crate/logger.h"
#include <string.h>
Include dependency graph for logger.c:

Go to the source code of this file.

Functions

void cr_log (enum cr_log_level lev, const char *fmt,...)
 
void cr_vlog (enum cr_log_level lev, const char *fmt, va_list args)
 
void cr_set_debug_level (enum cr_log_level level)
 
void cr_log_ex (enum cr_log_level lev, const char *pre, const char *post, const char *fmt,...)
 

Variables

enum cr_log_level log_level = CLL_INFO
 
enum cr_log_level prev_level = CLL_DEBUG
 
struct {
   const char *   name
 
level_str []
 

Function Documentation

◆ cr_log()

void cr_log ( enum cr_log_level  lev,
const char *  fmt,
  ... 
)

Definition at line 39 of file logger.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cr_log_ex()

void cr_log_ex ( enum cr_log_level  lev,
const char *  pre,
const char *  post,
const char *  fmt,
  ... 
)

Definition at line 69 of file logger.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ level_str

struct { ... } level_str[]
Initial value:
= {
[CLL_ERROR] = {"error"},
[CLL_WARN] = {"warning"},
[CLL_INFO] = {"info"},
[CLL_TRACE] = {"trace"},
[CLL_DEBUG] = {"dbg"},
}

◆ log_level

enum cr_log_level log_level = CLL_INFO

Definition at line 26 of file logger.c.

◆ name

const char* name

Definition at line 30 of file logger.c.

◆ prev_level

enum cr_log_level prev_level = CLL_DEBUG

Definition at line 27 of file logger.c.