ONPOSIX
2.0
|
#include <fstream>
#include <ostream>
#include <string>
#include <sstream>
#include <sys/time.h>
#include "PosixMutex.hpp"
Go to the source code of this file.
Classes | |
class | Logger |
Simple logger to log messages on file and console. More... |
Namespaces | |
namespace | onposix |
Macros | |
#define | LOG_MULTITHREAD |
Comment this line if you don't need multithread support. | |
#define | LOG_NOLOG 0 |
Log levels: | |
#define | LOG_ERRORS 1 |
Log only error messages. | |
#define | LOG_WARNINGS 2 |
Log warnings and error messages. | |
#define | LOG_ALL 3 |
Log all. | |
#define | LOG_LEVEL_CONSOLE LOG_WARNINGS |
Log level for console messages: | |
#define | LOG_LEVEL_FILE LOG_ALL |
Log level for file: | |
#define | LOG_FILE(outputFile) |
Macro to set the file used for logging. | |
#define | ERROR(msg) |
Macro to print error messages. | |
#define | WARNING(msg) |
Macro to print warning messages. | |
#define | DEBUG(msg) |
Macro to print debug messages. |
#define DEBUG | ( | msg | ) |
Macro to print debug messages.
Example of usage:
Definition at line 161 of file Logger.hpp.
#define ERROR | ( | msg | ) |
Macro to print error messages.
Example of usage:
Definition at line 98 of file Logger.hpp.
#define LOG_ALL 3 |
Log all.
Definition at line 37 of file Logger.hpp.
#define LOG_ERRORS 1 |
Log only error messages.
Definition at line 35 of file Logger.hpp.
#define LOG_FILE | ( | outputFile | ) |
Macro to set the file used for logging.
Base | name of the file used for logging (e.g. "/tmp/myproject") |
Example of configuration of the Logger: *
Definition at line 65 of file Logger.hpp.
#define LOG_LEVEL_CONSOLE LOG_WARNINGS |
Log level for console messages:
Definition at line 41 of file Logger.hpp.
#define LOG_LEVEL_FILE LOG_ALL |
Log level for file:
Definition at line 46 of file Logger.hpp.
#define LOG_MULTITHREAD |
Comment this line if you don't need multithread support.
Definition at line 31 of file Logger.hpp.
#define LOG_NOLOG 0 |
#define LOG_WARNINGS 2 |
Log warnings and error messages.
Definition at line 36 of file Logger.hpp.
#define WARNING | ( | msg | ) |
Macro to print warning messages.
Example of usage:
Definition at line 137 of file Logger.hpp.