File cmb_logger.h

Parent directory (include)

Centralized logging functions with simulation timestamps.

Definition (include/cmb_logger.h)

Detailed Description

Each call to the logger tags the message with a logging flag value. The flag value is matched against the simulation logging mask. If a bitwise and (&) of the current mask and the provided flags is non-zero, the message gets printed. This allows more combinations of system and user logging levels than a simple linear logging verbosity level. A single logging message can be flagged by a bitmask with several bits set, matching any of those bits in the current mask. A 32-bit unsigned integer is used for the flags, with the top four bits reserved for Cimba use, leaving 28 bits for user application.

Will print the trial number as the first field if part of a multi-trial experiment. Will print the random number seed for message levels warning and above to enable reproducing the suspect condition in a debugger or with additional logging turned on.

Format of a logging line: [trial_index] [seed] time process_name function (line) : [label] formatted_message

The initial logging bitmask is 0xFFFFFFFF, printing everything.

Includes

  • cmi_config.h

  • stdint.h

  • stdio.h

Included By

Functions

Defines

Typedefs