libfilezilla
Public Member Functions | List of all members
stdout_logger Class Referencefinal

A simple logger that writes to stdout. More...

#include <logger.hpp>

Inheritance diagram for stdout_logger:
Inheritance graph
[legend]
Collaboration diagram for stdout_logger:
Collaboration graph
[legend]

Public Member Functions

virtual void do_log (logmsg::type, std::wstring &&) override
 The one thing you need to override.
 
- Public Member Functions inherited from logger_interface
 logger_interface (logger_interface const &)=delete
 
logger_interfaceoperator= (logger_interface const &)=delete
 
template<typename String , typename... Args>
void log (logmsg::type t, String &&fmt, Args &&...args)
 
template<typename String , typename... Args>
void log_u (logmsg::type t, String &&fmt, Args const &...args)
 
template<typename String >
void log_raw (logmsg::type t, String &&msg)
 Logs the raw string, it is not treated as format string.
 
template<typename String >
void log_u_raw (logmsg::type t, String &&msg)
 
bool should_log (logmsg::type t) const
 Is any of the passed log levels set.
 
logmsg::type levels () const
 Returns all currently enabled log levels.
 
virtual void set_all (logmsg::type t)
 Sets which message types should be logged.
 
void set (logmsg::type t, bool flag)
 Sets whether the given types should be logged.
 
virtual void enable (logmsg::type t)
 Enables logging for the passed message types.
 
virtual void disable (logmsg::type t)
 Disables logging for the passed message types.
 

Additional Inherited Members

- Protected Attributes inherited from logger_interface
std::atomic< uint64_t > level_ {logmsg::status | logmsg::error | logmsg::command | logmsg::reply}
 

Detailed Description

A simple logger that writes to stdout.

Examples
aio.cpp, and https.cpp.

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