CAEN Utility  2.0.2
Utilities for CAEN projects
Logger functions

Log related functions. More...

Functions

void c_lsetst (uint64_t time)
 
int32_t c_lchangefile (FILE *file)
 
int32_t c_lresumefile (void)
 
void c_ldeinit (void)
 
int32_t c_lsetsm (uint32_t sevMask)
 
int32_t c_lgetsm (uint32_t *sevMask)
 
int32_t c_lvprintf (const c_locallogger_t *locallogger, c_logger_Severity s, int32_t line, const char *__restrict format, va_list args)
 
int32_t c_lprintf (const c_locallogger_t *locallogger, c_logger_Severity s, int32_t line, const char *__restrict format,...)
 

Detailed Description

Log related functions.

Function Documentation

◆ c_lsetst()

void c_lsetst ( uint64_t  time)

Set the start time.

Parameters
[in]timetime in milliseconds since 00:00:00 UTC, January 1, 1970.

Definition at line 309 of file CAENLogger.c.

Here is the caller graph for this function:

◆ c_lchangefile()

int32_t c_lchangefile ( FILE *  file)

Set a new file, already opened. The original file is not close, but its pointer stored. It's up to the caller to close the new file at the end.

Parameters
[in]filea pointer to FILE, already opened.
Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 313 of file CAENLogger.c.

Here is the call graph for this function:

◆ c_lresumefile()

int32_t c_lresumefile ( void  )

Resume the original file after a call to c_lchangefile().

Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 329 of file CAENLogger.c.

Here is the call graph for this function:

◆ c_ldeinit()

void c_ldeinit ( void  )

Close and clear the logging system.

Definition at line 390 of file CAENLogger.c.

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

◆ c_lsetsm()

int32_t c_lsetsm ( uint32_t  sevMask)

Set the Severity Mask

Parameters
[in]sevMaskthe severity mask, a combination of bits specified in c_logger_Severity
Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 345 of file CAENLogger.c.

◆ c_lgetsm()

int32_t c_lgetsm ( uint32_t *  sevMask)

Set the current Severity Mask

Parameters
[out]sevMaskthe severity mask, a combination of bits specified in c_logger_Severity
Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 350 of file CAENLogger.c.

◆ c_lvprintf()

int32_t c_lvprintf ( const c_locallogger_t locallogger,
c_logger_Severity  s,
int32_t  line,
const char *__restrict  format,
va_list  args 
)

Main logger function. If not initialized, the function will configure the logger. Variable argument list version.

Parameters
[in,out]localloggerthe local logger
[in]sthe severity mask
[in]linethe line, to be filled with standard preprocessor define __LINE__
[in]formatstring that contains a format string that follows the same specifications as format in printf
[in]argsa variable arguments list initialized with va_start
Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 366 of file CAENLogger.c.

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

◆ c_lprintf()

int32_t c_lprintf ( const c_locallogger_t locallogger,
c_logger_Severity  s,
int32_t  line,
const char *__restrict  format,
  ... 
)

Main logger function. If not initialized, the function will configure the logger.

Parameters
[in,out]localloggerthe local logger
[in]sthe severity mask
[in]linethe line, to be filled with standard preprocessor define __LINE__
[in]formatstring that contains a format string that follows the same specifications as format in printf
[in]...sequence of additional arguments
Returns
c_logger_Success (0) in case of success. Error codes specified in c_logger_ErrorCode_t.

Definition at line 358 of file CAENLogger.c.

Here is the call graph for this function: