LAR Library: log.h File Reference

LAR Library

log.h File Reference

General Logging System. More...

#include <larlib/base.h> #include <stdarg.h>

Go to the source code of this file.

Macros

#define LOG_ALL_CHANNELS   0, 256
 This is a short-cut to define the parameters of all channels in one single call to logSetChannels().
 
#define LOG_ASSERT(cond)
 Assertion using larlib.log for output. More...
 

Typedefs

typedef int(* logWriteFunction_t) (void *context, uint16_t channelLevel, const char *msg, int msgLength)
 Type of the function that does the actual writing on a trace channel. More...
 
typedef int(* logDumpFunction_t) (logWriteFunction_t write, void *context, uint16_t channelLevel, const void *data, int dataLen)
 Type of function called to format the output on logDump(). More...
 

Enumerations

enum  logLevel_t {
  LOG_DEBUG = 0x0000, LOG_INFO = 0x2000, LOG_WARNING = 0x4000, LOG_ERROR = 0x6000,
  LOG_CRITICAL = 0x8000, LOG_ALWAYS = 0xFF00
}
 General tracing levels. More...
 
enum  logReservedChannels_t {
  LOG_CH_BASE = 200, LOG_CH_CONV, LOG_CH_DATE, LOG_CH_FS,
  LOG_CH_INI, LOG_CH_MEM, LOG_CH_TAB, LOG_CH_STEP,
  LOG_CH_FORMAT, LOG_CH_TASK
}
 List of reserved log channels. More...
 

Functions

int logWriteTeliumTrace (void *context, uint16_t channelLevel, const char *msg, int msgLength)
 A logWriteFunction_t that can be used as parameter to logSetChannels() and writes traces using Telium's trace() function. More...
 
int logWriteTeliumRemoteDebugger (void *context, uint16_t channelLevel, const char *msg, int msgLength)
 A logWriteFunction_t that can be used as parameter to logSetChannels() and writes traces to the Remote Debugger console on IngeDev. More...
 
int logDumpFormattedAscii (logWriteFunction_t write, void *context, uint16_t channelLevel, const void *data, int dataLen)
 dumpFormatFunction that formats the received buffer as a two-column hexadecimal and ASCII display and calls the received write function. More...
 
int logSetChannels (uint8_t firstChannel, int numChannels, uint16_t level, logWriteFunction_t writeFunction, logDumpFunction_t dumpFormatFunction, void *context)
 Configures one or more tracing channels. More...
 
int logChannelIsEnabled (uint16_t channelLevel)
 Check if a log channel is enabled for a specific priority level. More...
 
int logPrintf (uint16_t channelLevel, const char *fmt,...)
 sprintf() like formatted traces. More...
 
int logPrintvf (uint16_t channelLevel, const char *fmt, va_list va)
 A version of logPrintf() that accepts a va_list as parameter. More...
 
int logDump (uint16_t channelLevel, const void *buffer, int size)
 Write a block of data as a binary dump. More...
 

Detailed Description

General Logging System.

Generated on Mon Mar 27 2017 15:42:52 for LAR Library by   doxygen 1.8.9.1