PCB Environment: /home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/Log.hpp File Reference

PCB Environment 2

Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations
Log.hpp File Reference
`#include <iomanip>`
`#include <chrono>`
`#include <fstream>`
`#include <sstream>`
`#include <set>`
`#include <string>`
`#include <thread>`

Go to the source code of this file.

## Data Structures
class | LogFile
class | Logger

## Macros
#define | GYM_PCB_MAX_LOG_LEVEL 3
#define | GYM_PCB_LOG_SHOW_THREAD 0
#define | GYM_PCB_LOG_FORMAT_TIME 1
#define | _PCB_GYM_LOG_IF(v, func, args...)
#define | ERROR(args...)
#define | WARN(args...)
#define | INFO(args...)
#define | NOTICE(args...)
#define | DEBUG(args...)
#define | TRACE(args...)
#define | RETURN_ERROR(rv, args...)

## Enumerations
enum class | LogLevel { ERROR = 0 , WARNING = 1 , NOTICE = 2 , INFO = 3 , DEBUG = 4 , TRACE = 5 , COUNT = 6 }

## Macro Definition Documentation

## ◆ _PCB_GYM_LOG_IF

#define _PCB_GYM_LOG_IF | ( |  | v,
|  |  | func,
|  |  | args... )

Value:
if (int(v) <= GYM_PCB_MAX_LOG_LEVEL && Logger::get().visible(v)) { std::stringstream ___ss; ___ss << args; Logger::get().func(___ss.str()); }
GYM_PCB_MAX_LOG_LEVEL
#define GYM_PCB_MAX_LOG_LEVEL
Definition Log.hpp:25
Logger::get
static Logger & get()
Definition Log.hpp:76

## ◆ DEBUG

#define DEBUG | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::DEBUG, Debug, args) } while (0)
_PCB_GYM_LOG_IF
#define _PCB_GYM_LOG_IF(v, func, args...)
Definition Log.hpp:34
LogLevel::DEBUG
@ DEBUG
Definition Log.hpp:19

## ◆ ERROR

#define ERROR | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::ERROR, Error, args) } while (0)
LogLevel::ERROR
@ ERROR
Definition Log.hpp:15

## ◆ GYM_PCB_LOG_FORMAT_TIME

#define GYM_PCB_LOG_FORMAT_TIME 1

## ◆ GYM_PCB_LOG_SHOW_THREAD

#define GYM_PCB_LOG_SHOW_THREAD 0

## ◆ GYM_PCB_MAX_LOG_LEVEL

#define GYM_PCB_MAX_LOG_LEVEL 3

## ◆ INFO

#define INFO | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::INFO, Info, args) } while (0)
LogLevel::INFO
@ INFO
Definition Log.hpp:18

## ◆ NOTICE

#define NOTICE | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::NOTICE, Notice, args) } while (0)
LogLevel::NOTICE
@ NOTICE
Definition Log.hpp:17

## ◆ RETURN_ERROR

#define RETURN_ERROR | ( |  | rv,
|  |  | args... )

Value:
do { ERROR(args); return rv; } while (0)
ERROR
#define ERROR(args...)
Definition Log.hpp:36

## ◆ TRACE

#define TRACE | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::TRACE, Trace, args) } while (0)
LogLevel::TRACE
@ TRACE
Definition Log.hpp:20

## ◆ WARN

#define WARN | ( |  | args... | ) |

Value:
do { _PCB_GYM_LOG_IF(LogLevel::WARNING, Warn, args) } while (0)
LogLevel::WARNING
@ WARNING
Definition Log.hpp:16

## Enumeration Type Documentation

## ◆ LogLevel

enum class LogLevel
| strong

Enumerator
ERROR |
WARNING |
NOTICE |
INFO |
DEBUG |
TRACE |
COUNT |