StreamHandlerFactory is a LogHandlerFactory that constructs log handlers that write to stdout or stderr.

Synopsis

Declared in <folly/logging/StreamHandlerFactory.h>

class StreamHandlerFactory
    : public LogHandlerFactory

Description

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.

Base Classes

Name

Description

LogHandlerFactory

Interface for factories that construct log handlers from config options.

Types

Name

Description

WriterFactory

Builds the log writer used by handlers from this factory.

Type Aliases

Name

Description

Options

A map of configuration option names to values.

Member Functions

Name

Description

createHandler [virtual]

Creates a log handler from the given options.

getType [virtual]

Returns the configuration type name for this factory.

updateHandler [virtual]

Update an existing LogHandler with a new configuration.

Created with MrDocs