folly::ImmediateFileWriter

A LogWriter implementation that immediately writes to a file descriptor when it is invoked.

Synopsis

Declared in <folly/logging/ImmediateFileWriter.h>

class ImmediateFileWriter
    : public LogWriter

Description

The downside of this class is that logging I/O occurs directly in your normal program threads, so that logging I/O may block or slow down normal processing.

However, one benefit of this class is that log messages are written out immediately, so if your program crashes, all log messages generated before the crash will have already been written, and no messages will be lost.

Base Classes

NameDescription
LogWriterLogWriter defines the interface for processing a serialized log message.

Enums

NameDescription
Flags Bit flag values for use with writeMessage()

Member Functions

NameDescription
ImmediateFileWriter [constructor]Constructors
flush [virtual]Flushes any buffered output to the file.
getFile Get the output file.
ttyOutput [virtual]Returns true if the output steam is a tty.
writeMessage writeMessage overloads
writeMessageSync [virtual]Write a message synchronously.

Using Declarations

NameDescription
writeMessage Inherits the base class writeMessage() overloads.