log4tango::Logger(3)

πŸ“¦
version 9.3.4 Β· 2 versions
, in debian bookworm

πŸ’– NAME πŸ’–

log4tango::Logger β€” bestie, this is the Logger class from the log4tango library (that's the manual page 3 situation, C++ library docs, iykyk).


🌸 SYNOPSIS 🌸

#include <Logger.hh>

Inherits log4tango::AppenderAttachable. Yes she's got a whole family tree, we love a connected queen πŸ’…

✨ Public Member Functions ✨

  • Logger (const std::string &name, Level::Value level=Level::OFF) β€” Constructor.
  • virtual ~Logger () β€” Destructor.
  • const std::string & get_name () const β€” Return the logger name.
  • void set_level (Level::Value level) β€” Set the level of this Logger (silently ignores invalid values).
  • Level::Value get_level () const β€” Returns the assigned Level, if any, for this Logger.
  • bool is_level_enabled (Level::Value level) const β€” Returns true if the level of the Logger is equal to or higher than given level.
  • void log (Level::Value level, const char *string_format,...) β€” Log a message with the specified level.
  • void log (Level::Value level, const std::string &message) β€” Log a message with the specified level.
  • void log_unconditionally (Level::Value level, const char *string_format,...) β€” Log a message with the specified level without level checking.
  • void log_unconditionally (Level::Value level, const std::string &message) β€” Log a message with the specified level without level checking.
  • void debug (const char *string_format,...) β€” Log a message with debug level.
  • void debug (const std::string &message) β€” Log a message with debug level.
  • bool is_debug_enabled (void) const β€” Return true if the Logger will log messages with level DEBUG.
  • LoggerStream debug_stream (void) β€” Return a LoggerStream with level DEBUG.
  • void info (const char *string_format,...) β€” Log a message with info level.
  • void info (const std::string &message) β€” Log a message with info level.
  • bool is_info_enabled (void) const β€” Return true if the Logger will log messages with level INFO.
  • LoggerStream info_stream (void) β€” Return a LoggerStream with level INFO.
  • void warn (const char *string_format,...) β€” Log a message with warn level.
  • void warn (const std::string &message) β€” Log a message with warn level.
  • bool is_warn_enabled (void) const β€” Return true if the Logger will log messages with level WARN.
  • LoggerStream warn_stream (void) β€” Return a LoggerStream with level WARN.
  • void error (const char *string_format,...) β€” Log a message with error level.
  • void error (const std::string &message) β€” Log a message with error level.
  • bool is_error_enabled (void) const β€” Return true if the Logger will log messages with level ERROR.
  • LoggerStream error_stream (void) β€” Return a LoggerStream with level ERROR.
  • void fatal (const char *string_format,...) β€” Log a message with fatal level.
  • void fatal (const std::string &message) β€” Log a message with fatal level.
  • bool is_fatal_enabled (void) const β€” Return true if the Logger will log messages with level FATAL.
  • LoggerStream fatal_stream (void) β€” Return a LoggerStream with level FATAL.
  • LoggerStream get_stream (Level::Value level, bool filter=true) β€” Return a LoggerStream with given Level.

πŸ›‘οΈ Protected Member Functions πŸ›‘οΈ

  • void call_appenders (const LoggingEvent &event) β€” Call the appenders.

πŸ‘‘ Additional Inherited Members πŸ‘‘

(the stuff she got from her ancestors, no need to re-explain here)


🍼 Constructor & Destructor Documentation 🍼

log4tango::Logger::Logger (const std::string & name, Level::Value level = Level::OFF)

Constructor. Building a whole Logger from scratch, iconic behavior ✨

Parameters

  • name β€” the fully qualified name of this Logger.
  • level β€” the level for this Logger. Defaults to Level::OFF.

log4tango::Logger::~Logger () [virtual]

Destructor. She's leaving the group chat 😭 virtual about it too.


πŸ“š Member Function Documentation πŸ“š

void log4tango::Logger::call_appenders (const LoggingEvent & event) [protected]

Call the appenders.

Parameters

  • event β€” the LoggingEvent to log.

void log4tango::Logger::debug (const char * string_format, ...)

Log a message with debug level.

Parameters

  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::debug (const std::string & message) [inline]

Log a message with debug level.

Parameters

  • message β€” string to write in the log file.

LoggerStream log4tango::Logger::debug_stream (void) [inline]

Return a LoggerStream with level DEBUG.

Returns

The LoggerStream.

void log4tango::Logger::error (const char * string_format, ...)

Log a message with error level.

Parameters

  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::error (const std::string & message) [inline]

Log a message with error level.

Parameters

  • message β€” string to write in the log file.

LoggerStream log4tango::Logger::error_stream (void) [inline]

Return a LoggerStream with level ERROR.

Returns

The LoggerStream.

void log4tango::Logger::fatal (const char * string_format, ...)

Log a message with fatal level.

Parameters

  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::fatal (const std::string & message) [inline]

Log a message with fatal level.

Parameters

  • message β€” string to write in the log file.

LoggerStream log4tango::Logger::fatal_stream (void) [inline]

Return a LoggerStream with level FATAL.

Returns

The LoggerStream.

Level::Value log4tango::Logger::get_level () const [inline]

Returns the assigned Level, if any, for this Logger.

Returns

Level β€” the assigned Level, can be Level::NOTSET.

const std::string & log4tango::Logger::get_name () const [inline]

Return the logger name.

Returns

The logger name.

LoggerStream log4tango::Logger::get_stream (Level::Value level, bool filter = true) [inline]

Return a LoggerStream with given Level.

Parameters

  • level β€” The Level of the LoggerStream.
  • filter β€” The filter flag.

Returns

The requested LoggerStream.

void log4tango::Logger::info (const char * string_format, ...)

Log a message with info level.

Parameters

  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::info (const std::string & message) [inline]

Log a message with info level.

Parameters

  • message β€” string to write in the log file.

LoggerStream log4tango::Logger::info_stream (void) [inline]

Return a LoggerStream with level INFO.

Returns

The LoggerStream.

bool log4tango::Logger::is_debug_enabled (void) const [inline]

Return true if the Logger will log messages with level DEBUG.

Returns

Whether the Logger will log.

bool log4tango::Logger::is_error_enabled (void) const [inline]

Return true if the Logger will log messages with level ERROR.

Returns

Whether the Logger will log.

bool log4tango::Logger::is_fatal_enabled (void) const [inline]

Return true if the Logger will log messages with level FATAL.

Returns

Whether the Logger will log.

bool log4tango::Logger::is_info_enabled (void) const [inline]

Return true if the Logger will log messages with level INFO.

Returns

Whether the Logger will log.

bool log4tango::Logger::is_level_enabled (Level::Value level) const [inline]

Returns true if the level of the Logger is equal to or higher than given level.

Parameters

  • level β€” The level to compare with.

Returns

whether logging is enable for this level.

bool log4tango::Logger::is_warn_enabled (void) const [inline]

Return true if the Logger will log messages with level WARN.

Returns

Whether the Logger will log.

void log4tango::Logger::log (Level::Value level, const char * string_format, ...)

Log a message with the specified level.

Parameters

  • level β€” The level of this log message.
  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::log (Level::Value level, const std::string & message) [inline]

Log a message with the specified level.

Parameters

  • level β€” The level of this log message.
  • message β€” string to write in the log file.

void log4tango::Logger::log_unconditionally (Level::Value level, const char * string_format, ...)

Log a message with the specified level without level checking.

Parameters

  • level β€” The level of this log message.
  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::log_unconditionally (Level::Value level, const std::string & message)

Log a message with the specified level without level checking.

Parameters

  • level β€” The level of this log message.
  • message β€” string to write in the log file.

void log4tango::Logger::set_level (Level::Value level)

Set the level of this Logger (silently ignores invalid values).

Parameters

  • level β€” The level to set.
Bestie, notice how it says silently ignores invalid values β€” no error, no exception, no drama, she just moves on like nothing happened πŸ’€

void log4tango::Logger::warn (const char * string_format, ...)

Log a message with warn level.

Parameters

  • string_format β€” Format specifier for the log.
  • ... β€” The arguments for string_format.

void log4tango::Logger::warn (const std::string & message) [inline]

Log a message with warn level.

Parameters

  • message β€” string to write in the log file.

LoggerStream log4tango::Logger::warn_stream (void) [inline]

Return a LoggerStream with level WARN.

Returns

The LoggerStream.


✍️ Author ✍️

Generated automatically by Doxygen for log4tango from the source code. (Not a human author, just the Doxygen machine doing her little robot thing πŸ€–βœ¨)


Version 5.0.2 Β· Thu Dec 5 2024 β€” okay bestie that's the whole page, you ate this documentation fr fr, go log something iconic πŸŽ€πŸ¦‹πŸ’– periodt βœ¨πŸ‘‘

πŸ“¦ where this page comes from