Console.hh
Go to the documentation of this file.
147 };
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: SuppressWarning.hh:64
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: SuppressWarning.hh:67
Container for loggers, and global logging options (such as verbose vs. quiet output).
Definition: Console.hh:213
static Logger dbg
Global instance of the debug logger.
Definition: Console.hh:255
static std::string Prefix()
Get custom prefix. This is empty by default.
static void SetVerbosity(const int _level)
Set verbosity, where <= 0: No output, 1: Error messages, 2: Error and warning messages,...
static FileLogger log
Global instance of the file logger.
Definition: Console.hh:261
static Logger err
Global instance of the error logger.
Definition: Console.hh:252
static void SetPrefix(const std::string &_customPrefix)
Add a custom prefix in front of the default prefixes.
static Logger warn
Global instance of the warning logger.
Definition: Console.hh:258
static Logger msg
Global instance of the message logger.
Definition: Console.hh:249
virtual int sync()
Sync the stream (output the string buffer contents).
std::ofstream * stream
Stream to output information into.
Definition: Console.hh:122
virtual FileLogger & operator()()
Output a filename and line number, then return a reference to the logger.
std::string LogDirectory() const
Get the full path of the directory where all the log files are stored.
virtual FileLogger & operator()(const std::string &_file, int _line)
Output a filename and line number, then return a reference to the logger.
void Init(const std::string &_directory, const std::string &_filename)
Initialize the file logger.
int color
ANSI color code using Select Graphic Rendition parameters (SGR). See http://en.wikipedia....
Definition: Console.hh:197
LogType type
Destination type for the messages.
Definition: Console.hh:192
int verbosity
Level of verbosity.
Definition: Console.hh:200
virtual int sync()
Sync the stream (output the string buffer contents).
Buffer(LogType _type, const int _color, const int _verbosity)
Constructor.
virtual Logger & operator()(const std::string &_file, int _line)
Output a filename and line number, then return a reference to the logger.
Logger(const std::string &_prefix, const int _color, const LogType _type, const int _verbosity)
Constructor.
Forward declarations for the common classes.