gz/common/Console.hh
Buffer(LogType _type, const int _color, const int _verbosity)
Constructor.
static std::string Prefix()
Get custom prefix. This is empty by default.
LogType type
Destination type for the messages.
Definition: gz/common/Console.hh:212
Forward declarations for the common classes.
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
static FileLogger log
Global instance of the file logger.
Definition: gz/common/Console.hh:287
String buffer for the file logger.
Definition: gz/common/Console.hh:108
std::streamsize xsputn(const char *_char, std::streamsize _count) override
Writes _count characters to the string buffer.
static void SetVerbosity(const int _level)
Set verbosity, where <= 0: No output, 1: Error messages, 2: Error and warning messages,...
static Logger warn
Global instance of the warning logger.
Definition: gz/common/Console.hh:284
static void SetPrefix(const std::string &_customPrefix)
Add a custom prefix in front of the default prefixes.
Logger(const std::string &_prefix, const int _color, const LogType _type, const int _verbosity)
Constructor.
virtual FileLogger & operator()()
Output a filename and line number, then return a reference to the logger.
static Logger err
Global instance of the error logger.
Definition: gz/common/Console.hh:278
int verbosity
Level of verbosity.
Definition: gz/common/Console.hh:220
std::string LogDirectory() const
Get the full path of the directory where all the log files are stored.
STL class.
STL class.
Container for loggers, and global logging options (such as verbose vs. quiet output).
Definition: gz/common/Console.hh:238
int sync() override
Sync the stream (output the string buffer contents).
A logger that outputs messages to a file.
Definition: gz/common/Console.hh:70
std::ofstream * stream
Stream to output information into.
Definition: gz/common/Console.hh:130
std::streamsize xsputn(const char *_char, std::streamsize _count) override
Writes _count characters to the string buffer.
static Logger msg
Global instance of the message logger.
Definition: gz/common/Console.hh:275
int sync() override
Sync the stream (output the string buffer contents).
LogType
Output destination type.
Definition: gz/common/Console.hh:154
int color
ANSI color code using Select Graphic Rendition parameters (SGR). See http://en.wikipedia....
Definition: gz/common/Console.hh:217
void Init(const std::string &_directory, const std::string &_filename)
Initialize the file logger.
static Logger dbg
Global instance of the debug logger.
Definition: gz/common/Console.hh:281
String buffer for the base logger.
Definition: gz/common/Console.hh:186
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68