logging: add ImmediateFileWriter
authorAdam Simpkins <simpkins@fb.com>
Thu, 15 Jun 2017 18:03:55 +0000 (11:03 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Jun 2017 18:06:06 +0000 (11:06 -0700)
commitcb238d299031affd40d234266415d0b6322b370a
treeafe1fd75e318002e8198e8c9489dd8ce6808ef9c
parent78307e3ff5e75a490a4059fd72e2c659385cda7b
logging: add ImmediateFileWriter

Summary:
Add an ImmediateFileWriter class that implements the LogWriter interface by
immediately writing data it receives to a file descriptor.

This LogWriter implementation can be used by users that want to ensure log
messages are immediately flushed to a file as soon as they are written, at the
expense of possibly having logging I/O block their normal process threads.

Reviewed By: wez

Differential Revision: D5083105

fbshipit-source-id: 15cd071834e1784fe50e1d6d6ce403b9bc907047
CMakeLists.txt
folly/Makefile.am
folly/experimental/logging/ImmediateFileWriter.cpp [new file with mode: 0644]
folly/experimental/logging/ImmediateFileWriter.h [new file with mode: 0644]
folly/experimental/logging/Makefile.am
folly/experimental/logging/test/ImmediateFileWriterTest.cpp [new file with mode: 0644]