Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Utils::Logger Class Referenceabstractexport
Inheritance diagram for Mila::Utils::Logger:
Collaboration diagram for Mila::Utils::Logger:

Public Member Functions

virtual ~Logger ()=default
 
virtual LogLevel getLevel () const =0
 
virtual bool isEnabled (LogLevel level) const =0
 
virtual void log (std::string_view message, LogLevel level, const std::source_location &location=std::source_location::current())=0
 
virtual void log_critical (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void log_debug (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void log_error (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void log_info (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void log_trace (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void log_warning (std::string_view message, const std::source_location &location=std::source_location::current())=0
 
virtual void setLevel (LogLevel level)=0
 

Static Public Member Functions

static void critical (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void critical_fmt (std::format_string< Args... > fmt, Args &&... args)
 
static void debug (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void debug_fmt (std::format_string< Args... > fmt, Args &&... args)
 
static LoggerdefaultLogger ()
 
static void error (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void error_fmt (std::format_string< Args... > fmt, Args &&... args)
 
static void info (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void info_fmt (std::format_string< Args... > fmt, Args &&... args)
 
static void setDefaultLogger (Logger *logger)
 
static void trace (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void trace_fmt (std::format_string< Args... > fmt, Args &&... args)
 
static void warning (std::string_view message, const std::source_location &location=std::source_location::current())
 
template<typename... Args>
static void warning_fmt (std::format_string< Args... > fmt, Args &&... args)
 

Static Private Attributes

static LoggerdefaultLogger_ { nullptr }
 

Constructor & Destructor Documentation

◆ ~Logger()

virtual Mila::Utils::Logger::~Logger ( )
virtualdefault

Member Function Documentation

◆ critical()

static void Mila::Utils::Logger::critical ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:

◆ critical_fmt()

template<typename... Args>
static void Mila::Utils::Logger::critical_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug()

static void Mila::Utils::Logger::debug ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:

◆ debug_fmt()

template<typename... Args>
static void Mila::Utils::Logger::debug_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ defaultLogger()

static Logger & Mila::Utils::Logger::defaultLogger ( )
inlinestatic
Here is the caller graph for this function:

◆ error()

static void Mila::Utils::Logger::error ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:

◆ error_fmt()

template<typename... Args>
static void Mila::Utils::Logger::error_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLevel()

virtual LogLevel Mila::Utils::Logger::getLevel ( ) const
pure virtual

Implemented in Mila::Utils::DefaultLogger.

◆ info()

static void Mila::Utils::Logger::info ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ info_fmt()

template<typename... Args>
static void Mila::Utils::Logger::info_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEnabled()

virtual bool Mila::Utils::Logger::isEnabled ( LogLevel  level) const
pure virtual

Implemented in Mila::Utils::DefaultLogger.

◆ log()

virtual void Mila::Utils::Logger::log ( std::string_view  message,
LogLevel  level,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

◆ log_critical()

virtual void Mila::Utils::Logger::log_critical ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ log_debug()

virtual void Mila::Utils::Logger::log_debug ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ log_error()

virtual void Mila::Utils::Logger::log_error ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ log_info()

virtual void Mila::Utils::Logger::log_info ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ log_trace()

virtual void Mila::Utils::Logger::log_trace ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ log_warning()

virtual void Mila::Utils::Logger::log_warning ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

Here is the caller graph for this function:

◆ setDefaultLogger()

static void Mila::Utils::Logger::setDefaultLogger ( Logger logger)
inlinestatic
Here is the caller graph for this function:

◆ setLevel()

virtual void Mila::Utils::Logger::setLevel ( LogLevel  level)
pure virtual

Implemented in Mila::Utils::DefaultLogger.

◆ trace()

static void Mila::Utils::Logger::trace ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:

◆ trace_fmt()

template<typename... Args>
static void Mila::Utils::Logger::trace_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ warning()

static void Mila::Utils::Logger::warning ( std::string_view  message,
const std::source_location &  location = std::source_location::current() 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ warning_fmt()

template<typename... Args>
static void Mila::Utils::Logger::warning_fmt ( std::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ defaultLogger_

Logger* Mila::Utils::Logger::defaultLogger_ { nullptr }
inlinestaticprivate

The documentation for this class was generated from the following file: