CAEN MCA  0.99.10
SDK for Hexagon
Logging system

Table of Contents

Filename

By default, i.e. if no error occours when loading the CAEN libraries, the output is written in a file named CAENMCALog.txt, that is created in the current directory. In case of error, the file name could be different.

To change the default file, you may set the environmental variable

CAEN_LOG_FILENAME = <filename>

to force the output to a file of your choice. If you want the output to be printed in the standard output, use the special files of your system:

CAEN_LOG_FILENAME = /dev/stdout # Linux
CAEN_LOG_FILENAME = CON # Windows

Levels

The log supports 5 levels:

  • level 0: OFF (intended to turn off logging)
  • level 1: ERROR
  • level 2: WARNING
  • level 3: INFO
  • level 4: DEBUG

By default, all the levels are printed. To change the default file, you may set the environmental variable

CAEN_LOG_LEVEL = <level number>

to set the level to M. A log request of level N in a logger with level set to N will be enabled if N <= M.

Output format

The log will consist of lines in the form

[<seconds since start (12 chars, 3 decimal)>][<severity (2 chars)>][<source file>]: <Message>

Wher the severity is EE for ERROR, WW for WARNING, and so on. For example, these should be the beginning of log with successful connection to a device.

[ 0.303][II][CAENMCA.c]: Socket created.
[ 0.304][II][CAENMCA.c]: Connected to 'localhost:56342'.