|
Cogs.Core
|
#include <StructuredLogger.h>
Public Member Functions | |
| virtual void | consumeMessage (const char *source, Category category, uint32_t errorNumber, const char *message, const char *filename, int lineNumber) override |
Public Member Functions inherited from Cogs::Logging::Consumer | |
| Consumer () | |
| Constructs a new Consumer instance. | |
| virtual | ~Consumer () |
| Unregisters this consumer from the LogManager and destroys this instance. | |
| virtual void | consumeMessage (const char *source, Category category, uint32_t errorNumber, const char *message, const char *filename, int lineNumber)=0 |
| Category | getMinimumCategory () const |
| void | setMinimumCategory (Category category) |
| Set the minimum category level of messages that this consumer will output. | |
| void | enableFilenames (bool enable) |
Static Public Member Functions | |
| static StructuredLogger & | instance () |
| Retrieve the global StructuredLogger instance. | |
| static void | initialize () |
Static Public Member Functions inherited from Cogs::Logging::Consumer | |
| static void | setDefaultMinimumCategory (Category category) |
| Sets the default minimum category for all future consumers. | |
| static const char * | getCategoryName (Category category) |
| Retrieves a human-friendly name for the given category level. | |
| static const char * | getCategoryNameColor (Category category) |
Additional Inherited Members | |
Protected Attributes inherited from Cogs::Logging::Consumer | |
| Mutex | mutex |
| Mutex available for implementations to use if needed. | |
| bool | outputFilenames = false |
| Flag controlling whether or not to include the filenames for message sources. | |
StructuredLogger is a Consumer that writes log messages in a structured format for easy parsing. The format is: Category Timestamp (Filename:LineNumber) [Source] Message Category - one charactrer (T, D, I, W, E, F) Timestamp - ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ), 24 characters (Filename:LineNumber) - optional filename and line number [Source] - the source of the message Message - the message itself
Definition at line 16 of file StructuredLogger.h.
|
overridevirtual |
Implements Cogs::Logging::Consumer.
Definition at line 37 of file StructuredLogger.cpp.
|
inlinestatic |
Definition at line 22 of file StructuredLogger.h.
|
static |
Retrieve the global StructuredLogger instance.
(Or construct your own.)
Definition at line 30 of file StructuredLogger.cpp.