fix8
version 1.4.0
Open Source C++ FIX Framework
|
A global singleton logger. More...
#include <logger.hpp>
Static Public Member Functions | |
static void | set_global_filename (const std::string &from) |
static bool | log (const std::string &what, Logger::Level lev=Logger::Info, const char *fl=nullptr, unsigned int val=0) |
static bool | enqueue (const std::string &what, Logger::Level lev=Logger::Info, const char *fl=nullptr, unsigned int val=0) |
static void | flush_log () |
static void | set_flags (Logger::LogFlags flags) |
static void | set_levels (Logger::Levels levels) |
static void | set_delimiter (const std::string &delim) |
static void | set_positions (Logger::LogPositions positions) |
static void | stop () |
static bool | is_loggable (Logger::Level lev) |
Static Private Member Functions | |
static FileLogger & | instance () |
A global singleton logger.
fn | actual pathname of logfile |
Create a static instance of this template and set the template parameter to the desired logfile pathname
Definition at line 475 of file logger.hpp.
|
inlinestatic |
Enqueue a message to the logger. Will not check log level.
what | message to log |
lev | level to log |
fl | pointer to fileline |
val | extra value to log |
Definition at line 510 of file logger.hpp.
References FIX8::Logger::enqueue(), and FIX8::SingleLogger< fn >::instance().
|
inlinestatic |
Flush the logger
Definition at line 514 of file logger.hpp.
References FIX8::Logger::flush(), and FIX8::SingleLogger< fn >::instance().
|
inlinestaticprivate |
Definition at line 477 of file logger.hpp.
References FIX8::Logger::All, FIX8::Logger::buffer, FIX8::Logger::level, FIX8::Logger::location, FIX8::Logger::sequence, FIX8::Logger::thread, and FIX8::Logger::timestamp.
Referenced by FIX8::SingleLogger< fn >::enqueue(), FIX8::SingleLogger< fn >::flush_log(), FIX8::SingleLogger< fn >::is_loggable(), FIX8::SingleLogger< fn >::log(), FIX8::SingleLogger< fn >::set_delimiter(), FIX8::SingleLogger< fn >::set_flags(), FIX8::SingleLogger< fn >::set_levels(), FIX8::SingleLogger< fn >::set_positions(), and FIX8::SingleLogger< fn >::stop().
|
inlinestatic |
Check if the given log level is set for this logger
lev | level to test |
Definition at line 538 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::is_loggable().
|
inlinestatic |
Send a message to the logger.
what | message to log |
lev | level to log |
fl | pointer to fileline |
val | extra value to log |
Definition at line 501 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::send().
Referenced by main().
|
inlinestatic |
Set the field delimiter
delim | delimiter value to set |
Definition at line 526 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::set_delimiter().
|
inlinestatic |
Set the logflags
flags | flags to set |
Definition at line 518 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::set_flags().
|
inlinestatic |
Set the global logfile name.
from | name to set to |
Definition at line 492 of file logger.hpp.
References FIX8::CopyString(), and FIX8::max_global_filename_length().
Referenced by main().
|
inlinestatic |
Set the log levels
levels | levels to set |
Definition at line 522 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::set_levels().
|
inlinestatic |
Set the log positions
positions | positions to set |
Definition at line 530 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::set_positions().
|
inlinestatic |
Stop the logger
Definition at line 533 of file logger.hpp.
References FIX8::SingleLogger< fn >::instance(), and FIX8::Logger::stop().