12 #include "logger_export.hpp" 41 std::string LOGGER_EXPORT
logFile();
91 Line LOGGER_EXPORT
verbose(
const std::string & context =
"");
97 Line LOGGER_EXPORT
debug(
const std::string & context =
"");
103 Line LOGGER_EXPORT
info(
const std::string & context =
"");
109 Line LOGGER_EXPORT
warning(
const std::string & context =
"");
115 Line LOGGER_EXPORT
error(
const std::string & context =
"");
Level fileLevel()
Gets the minimum Level for file output.
std::string logFile()
Gets the output file for file logging.
Line warning(const std::string &context="")
Creates a new Line object with the Level Info. Once this object is destroyed, the content will be sen...
Level
Levels for filtering messages based on importance.
Definition: level.hpp:16
Used for disabling outputs.
Definition: level.hpp:41
int contextLength()
Gets the context lenght.
void setContextLength(const int &contextLength)
Sets the context lenght.
bool printTime()
Checks whether the current time is included in output.
void setPrintTime(const bool &printTime)
Sets whether the current time should be included in output.
void disable()
Disables the logger.
Logger namespace. Contains all available functions and classes.
Definition: level.hpp:11
Line error(const std::string &context="")
Creates a new Line object with the Level Error. Once this object is destroyed, the content will be se...
Used for important information. When logging to console, messages with this level will be sent to cou...
Definition: level.hpp:29
void enable(const Level &consoleLevel=Info, const Level &fileLevel=Off, const std::string &logFileFormat="log/%Y-%m-%d-%H-%M-%S.txt")
Enables the logger with the given minimum Levels. Call again to change these settings. This results in a new log file being generated, if file logging is enabled.
void setTimeFormat(const std::string &timeFormat)
Sets the format used printing the time.
std::string timeFormat()
Gets the format used printing the time.
Level consoleLevel()
Gets the minimum Level for console output.
bool enabled()
Checks if the logger is enabled.
Line verbose(const std::string &context="")
Creates a new Line object with the Level Verbose. Once this object is destroyed, the content will be ...
Line debug(const std::string &context="")
Creates a new Line object with the Level Debug. Once this object is destroyed, the content will be se...
Line info(const std::string &context="")
Creates a new Line object with the Level Info. Once this object is destroyed, the content will be sen...