CAEN Utility  2.0.2
Utilities for CAEN projects
CAENLogger.c File Reference

Logger implemented in C. More...

#include <CAENLogger.h>
#include <stdlib.h>
#include <CAENMultiplatform.h>
#include <CAENThread.h>
Include dependency graph for CAENLogger.c:

Go to the source code of this file.

Data Structures

struct  global_logger
 

Functions

static int32_t _lopenfile (void)
 
static bool _lcheckmask (uint32_t mask)
 
static bool _lisconfigured (void)
 
static bool _lisconfigured_locked (void)
 
static void _lfreeglobal (void)
 
static int32_t _lvprintf (const char *module_tree, c_logger_Severity s, int32_t line, const char *__restrict fmt, va_list args)
 
static int32_t _lvprintf_s (const char *module_tree, c_logger_Severity s, int32_t line, const char *__restrict fmt, va_list args)
 
static int32_t _lconfigure (const char *filename, c_logger_OpenMode_t om)
 
void c_lsetst (uint64_t time)
 
int32_t c_lchangefile (FILE *file)
 
int32_t c_lresumefile (void)
 
int32_t c_lsetsm (uint32_t sevMask)
 
int32_t c_lgetsm (uint32_t *sevMask)
 
int32_t c_lprintf (const c_locallogger_t *locallogger, c_logger_Severity s, int32_t line, const char *__restrict fmt,...)
 
int32_t c_lvprintf (const c_locallogger_t *locallogger, c_logger_Severity s, int32_t line, const char *__restrict fmt, va_list args)
 
void c_ldeinit (void)
 

Variables

static const uint32_t lConfiguredMask = 0xcafecae0
 
static uint32_t lSeverityMask = c_logger_Severity_ERROR | c_logger_Severity_WARNING | c_logger_Severity_INFO | c_logger_Severity_DEBUG
 
static uint64_t lStartTimeMs = 0
 
static struct global_loggerlGlobal = NULL
 
static const char lSeverityMap [][3]
 

Detailed Description

Logger implemented in C.

Author

Definition in file CAENLogger.c.

Function Documentation

◆ _lopenfile()

static int32_t _lopenfile ( void  )
static

Definition at line 79 of file CAENLogger.c.

Here is the caller graph for this function:

◆ _lcheckmask()

static bool _lcheckmask ( uint32_t  mask)
static

Definition at line 130 of file CAENLogger.c.

Here is the caller graph for this function:

◆ _lisconfigured()

static bool _lisconfigured ( void  )
static

Definition at line 134 of file CAENLogger.c.

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

◆ _lisconfigured_locked()

static bool _lisconfigured_locked ( void  )
static

Definition at line 144 of file CAENLogger.c.

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

◆ _lfreeglobal()

static void _lfreeglobal ( void  )
static

Definition at line 157 of file CAENLogger.c.

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

◆ _lvprintf()

static int32_t _lvprintf ( const char *  module_tree,
c_logger_Severity  s,
int32_t  line,
const char *__restrict  fmt,
va_list  args 
)
static

Definition at line 185 of file CAENLogger.c.

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

◆ _lvprintf_s()

static int32_t _lvprintf_s ( const char *  module_tree,
c_logger_Severity  s,
int32_t  line,
const char *__restrict  fmt,
va_list  args 
)
static

Definition at line 209 of file CAENLogger.c.

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

◆ _lconfigure()

static int32_t _lconfigure ( const char *  filename,
c_logger_OpenMode_t  om 
)
static

Definition at line 220 of file CAENLogger.c.

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

Variable Documentation

◆ lConfiguredMask

const uint32_t lConfiguredMask = 0xcafecae0
static

Definition at line 61 of file CAENLogger.c.

◆ lSeverityMask

Definition at line 64 of file CAENLogger.c.

◆ lStartTimeMs

uint64_t lStartTimeMs = 0
static

Definition at line 65 of file CAENLogger.c.

◆ lGlobal

struct global_logger* lGlobal = NULL
static

Definition at line 66 of file CAENLogger.c.

◆ lSeverityMap

const char lSeverityMap[][3]
static
Initial value:
= {
"UU",
"EE",
"WW",
"UU",
"II",
"UU",
"UU",
"UU",
"DD",
}

Definition at line 67 of file CAENLogger.c.