proxygen
|
#include <LogHandlerFactory.h>
Public Types | |
using | Options = std::unordered_map< std::string, std::string > |
Public Member Functions | |
virtual | ~LogHandlerFactory ()=default |
virtual StringPiece | getType () const =0 |
virtual std::shared_ptr< LogHandler > | createHandler (const Options &options)=0 |
virtual std::shared_ptr< LogHandler > | updateHandler (FOLLY_MAYBE_UNUSED const std::shared_ptr< LogHandler > &existingHandler, const Options &options) |
Definition at line 29 of file LogHandlerFactory.h.
using folly::LogHandlerFactory::Options = std::unordered_map<std::string, std::string> |
Definition at line 31 of file LogHandlerFactory.h.
|
virtualdefault |
|
pure virtual |
Create a new LogHandler.
Implemented in folly::TestLogHandlerFactory, folly::TestHandlerFactory, folly::FileHandlerFactory, and folly::StreamHandlerFactory.
Referenced by updateHandler().
|
pure virtual |
Get the type name of this LogHandlerFactory.
The type field in the LogHandlerConfig for all LogHandlers created by this factory should match the type of the LogHandlerFactory.
The type of a LogHandlerFactory should never change. The returned StringPiece should be valid for the lifetime of the LogHandlerFactory.
Implemented in folly::TestLogHandlerFactory, folly::TestHandlerFactory, folly::FileHandlerFactory, and folly::StreamHandlerFactory.
|
inlinevirtual |
Update an existing LogHandler with a new configuration.
This may create a new LogHandler object, or it may update the existing LogHandler in place.
The returned pointer will point to the input handler if it was updated in place, or will point to a new LogHandler if a new one was created.
Definition at line 60 of file LogHandlerFactory.h.
References createHandler().