UTIL Library

Logo

Utility C++ library that is intended to be used as a base when developing applications.

View the Project on GitHub ihedvall/utillib

Log Functions

The log function is based upon 3 objects.

Overview Log Functionality

Log Config

The LogConfig class is a singleton class that hold zero or more loggers (ILogger). The logger shall simply handle a log messages and send it to its destination.

Loggers

The user can add its own logger or create one of the 3 predefined logger. The following loggers are defined in the library.

It is possible to have many loggers added to the log chain (list of loggers).

Log Messages

The Log Messages are added to the code normally by using the LOG_***() macro functions defined in the ‘util/logstream.h’ include file. A message consist of time, severity, message text and source file location.

The time and source location is normally set by the software but the message text and severity are normally changed by the user. The following severity levels exist.