LogMessage represents a single message to be logged.
Declared in <folly/logging/LogMessage.h>
class LogMessage;
LogMessage objects are relatively temporary objects, that only exist for the time it takes to invoke all of the appropriate LogHandlers. These generally only live in the thread that logged the message, and are not modified once created. (That said, LogHandler implementations may copy and store LogMessage objects for later use if desired.)
| Name | Description |
|---|---|
LogMessage [constructor] | Constructors |
containsNewlines | Tests whether the message contains embedded newlines. |
getCategory | Returns the category this message was logged to. |
getContextString | Returns the additional context string associated with the message. |
getFileBaseName | Returns the base name of the source filename. |
getFileName | Returns the source filename where the message was logged. |
getFunctionName | Returns the function name where the message was logged. |
getLevel | Returns the level this message was logged at. |
getLineNumber | Returns the source line number where the message was logged. |
getMessage | Returns the message text, sanitized if necessary. |
getNumNewlines | Returns the number of embedded newlines in the message. |
getRawMessage | Returns the original, unsanitized message text. |
getThreadID | Returns the ID of the thread that logged the message. |
getTimestamp | Returns the time the message was logged. |