proxygen
folly::LogFormatter Class Referenceabstract

#include <LogFormatter.h>

Inheritance diagram for folly::LogFormatter:
folly::CustomLogFormatter folly::GlogStyleFormatter

Public Member Functions

virtual ~LogFormatter ()
 
virtual std::string formatMessage (const LogMessage &message, const LogCategory *handlerCategory)=0
 

Detailed Description

LogFormatter defines the interface for serializing a LogMessage object into a buffer to be given to a LogWriter.

Definition at line 29 of file LogFormatter.h.

Constructor & Destructor Documentation

virtual folly::LogFormatter::~LogFormatter ( )
inlinevirtual

Definition at line 31 of file LogFormatter.h.

References formatMessage(), and string.

31 {}

Member Function Documentation

virtual std::string folly::LogFormatter::formatMessage ( const LogMessage message,
const LogCategory handlerCategory 
)
pure virtual

Serialze a LogMessage object.

Parameters
messageThe LogMessage object to serialze.
handlerCategoryThe LogCategory that is currently handling this message. Note that this is likely different from the LogCategory where the message was originally logged, which can be accessed as message->getCategory()

Implemented in folly::GlogStyleFormatter, and folly::CustomLogFormatter.

Referenced by ~LogFormatter().


The documentation for this class was generated from the following file: