44 const std::vector<std::string>
_domainStrings = {
"GPU",
"Resources",
"Input",
"Utilities",
"Config"};
46 const std::vector<std::string>
_levelStrings = {
"",
"(!) ",
"(X) ",
""};
48 const std::vector<std::string>
_colorStrings = {
"\x1B[0m\x1B[39m",
"\x1B[0m\x1B[33m",
"\x1B[0m\x1B[31m",
"\x1B[2m\x1B[37m"};
59 Log(
const std::string & filePath,
bool logToStdin,
bool verbose =
false);
136 void setFile(
const std::string & filePath,
bool flushExisting =
true);
Contains configurable elements as attributes, populated from the command line, a configuration file o...
Definition: Config.hpp:25
Provide utility functions to communicate with the driver and GPU.
Definition: GPU.hpp:20
Provides logging utilities, either to the standard/error output or to a file, with multiple criticali...
Definition: Logger.hpp:17
void setVerbose(bool verbose)
Definition: Logger.cpp:96
void setFile(const std::string &filePath, bool flushExisting=true)
Definition: Logger.cpp:79
bool _logToStdOut
Should the logs be output to standard output.
Definition: Logger.hpp:147
bool _verbose
Is the logger verbose.
Definition: Logger.hpp:150
const std::vector< std::string > _colorStrings
Colors prefix strings.
Definition: Logger.hpp:48
Domain
Domain prefix that will be appended before a line.
Definition: Logger.hpp:21
Log & operator<<(const T &input)
Definition: Logger.hpp:71
bool _useColors
Should color formatting be used.
Definition: Logger.hpp:153
void flush()
Definition: Logger.cpp:128
bool _appendPrefix
Should a domain or level prefix be appended to the current line.
Definition: Logger.hpp:152
static Log * _defaultLogger
Default static logger.
Definition: Logger.hpp:155
bool _ignoreUntilFlush
Internal flag to ignore the current line if it is verbose.
Definition: Logger.hpp:151
static Log & Warning()
Definition: Logger.cpp:113
const std::vector< std::string > _domainStrings
Domain prefix strings.
Definition: Logger.hpp:44
static Log & Info()
Definition: Logger.cpp:108
static Log & Verbose()
Definition: Logger.cpp:123
std::ofstream _file
The output log file stream.
Definition: Logger.hpp:148
std::stringstream _stream
Internal log string stream.
Definition: Logger.hpp:149
void appendIfNeeded()
Definition: Logger.cpp:150
void set(Level l)
Definition: Logger.cpp:24
static void setDefaultFile(const std::string &filePath)
Definition: Logger.cpp:100
const std::vector< std::string > _levelStrings
Levels prefix strings.
Definition: Logger.hpp:46
Level
Criticality level.
Definition: Logger.hpp:31
@ VERBOSE
Will only be logged if verbose is enabled.
Level _level
The current criticality level.
Definition: Logger.hpp:146
static void setDefaultVerbose(bool verbose)
Definition: Logger.cpp:104
static Log & Error()
Definition: Logger.cpp:118
Log()
Definition: Logger.cpp:34
The Resources manager is responsible for all resources loading and setup.
Definition: ResourcesManager.hpp:48