logging: add a NEVER_DISCARD flag to LogWriter
authorAdam Simpkins <simpkins@fb.com>
Tue, 20 Jun 2017 18:01:55 +0000 (11:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 20 Jun 2017 18:06:44 +0000 (11:06 -0700)
commit84458670bb24056e0bb65d50b1653dcf0636f776
tree3175dc9a26d5aa59891d88602dc042ee4ecef62d
parent1b5a7dbf79e5cbcb0e99d7d37b87d158cc7a4e6d
logging: add a NEVER_DISCARD flag to LogWriter

Summary:
Add a flag to the LogWriter so we can ensure that particular messages are never
discarded, even when the LogWriter is throttling messages.

This functionality will be necessary to implement `FB_LOG(FATAL)` to that we
can avoid discarding the reason for crashing.

Reviewed By: wez

Differential Revision: D5189498

fbshipit-source-id: dc4322ea5ba449a341cdbdc32afb0ed466019801
folly/experimental/logging/AsyncFileWriter.cpp
folly/experimental/logging/AsyncFileWriter.h
folly/experimental/logging/ImmediateFileWriter.cpp
folly/experimental/logging/ImmediateFileWriter.h
folly/experimental/logging/LogWriter.h
folly/experimental/logging/test/AsyncFileWriterTest.cpp
folly/experimental/logging/test/StandardLogHandlerTest.cpp