proxygen
|
#include <FileWriterFactory.h>
Public Member Functions | |
bool | processOption (StringPiece name, StringPiece value) |
std::shared_ptr< LogWriter > | createWriter (File file) |
Private Attributes | |
bool | async_ {true} |
Optional< size_t > | maxBufferSize_ |
A helper class for creating an AsyncFileWriter or ImmediateFileWriter based on log handler options settings.
This is used by StreamHandlerFactory and FileHandlerFactory.
Definition at line 33 of file FileWriterFactory.h.
Definition at line 44 of file FileWriterFactory.cpp.
References async_, folly::Optional< Value >::hasValue(), maxBufferSize_, folly::gen::move, and folly::Optional< Value >::value().
Referenced by folly::StreamHandlerFactory::WriterFactory::createWriter(), and folly::FileHandlerFactory::WriterFactory::createWriter().
bool folly::FileWriterFactory::processOption | ( | StringPiece | name, |
StringPiece | value | ||
) |
Definition at line 28 of file FileWriterFactory.cpp.
References async_, maxBufferSize_, folly::size(), and folly::value().
Referenced by folly::FileHandlerFactory::WriterFactory::processOption(), and folly::StreamHandlerFactory::WriterFactory::processOption().
|
private |
Definition at line 39 of file FileWriterFactory.h.
Referenced by createWriter(), and processOption().
|
private |
Definition at line 40 of file FileWriterFactory.h.
Referenced by createWriter(), and processOption().