proxygen
|
#include <StreamHandlerFactory.h>
Classes | |
class | WriterFactory |
Public Member Functions | |
StringPiece | getType () const override |
std::shared_ptr< LogHandler > | createHandler (const Options &options) override |
![]() | |
virtual | ~LogHandlerFactory ()=default |
virtual std::shared_ptr< LogHandler > | updateHandler (FOLLY_MAYBE_UNUSED const std::shared_ptr< LogHandler > &existingHandler, const Options &options) |
Additional Inherited Members | |
![]() | |
using | Options = std::unordered_map< std::string, std::string > |
StreamHandlerFactory is a LogHandlerFactory that constructs log handlers that write to stdout or stderr.
This is quite similar to FileHandlerFactory, but it always writes to an existing open file descriptor rather than opening a new file. This handler factory is separate from FileHandlerFactory primarily for safety reasons: FileHandlerFactory supports appending to arbitrary files via config parameters, while StreamHandlerFactory does not.
Definition at line 32 of file StreamHandlerFactory.h.
|
overridevirtual |
Create a new LogHandler.
Implements folly::LogHandlerFactory.
Definition at line 60 of file StreamHandlerFactory.cpp.
References folly::StandardLogHandlerFactory::createHandler(), and getType().
Referenced by getType(), and TEST().
|
inlineoverridevirtual |
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.
Implements folly::LogHandlerFactory.
Definition at line 34 of file StreamHandlerFactory.h.
References createHandler().
Referenced by createHandler().