public static class FormattedLogProvider.Builder extends Object
FormattedLogProvider| Modifier and Type | Method and Description |
|---|---|
FormattedLogProvider |
toOutputStream(OutputStream out)
Creates a
FormattedLogProvider instance that writes messages to an OutputStream. |
FormattedLogProvider |
toOutputStream(org.neo4j.function.Supplier<OutputStream> outSupplier)
Creates a
FormattedLogProvider instance that writes messages to OutputStreams obtained from the specified
Supplier. |
FormattedLogProvider |
toPrintWriter(PrintWriter writer)
Creates a
FormattedLogProvider instance that writes messages to a PrintWriter. |
FormattedLogProvider |
toPrintWriter(org.neo4j.function.Supplier<PrintWriter> writerSupplier)
Creates a
FormattedLogProvider instance that writes messages to PrintWriters obtained from the specified
Supplier. |
FormattedLogProvider |
toWriter(Writer writer)
Creates a
FormattedLogProvider instance that writes messages to a Writer. |
FormattedLogProvider.Builder |
withDefaultLogLevel(Level level)
|
FormattedLogProvider.Builder |
withLogLevel(String context,
Level level)
|
FormattedLogProvider.Builder |
withLogLevels(Map<String,Level> levels)
Set the log level for many contexts - equivalent to calling
withLogLevel(String, Level) for every entry in the provided map. |
FormattedLogProvider.Builder |
withoutAutoFlush()
Disable auto flushing.
|
FormattedLogProvider.Builder |
withoutRenderingContext()
Disable rendering of the context (the class name or log name) in each output line.
|
FormattedLogProvider.Builder |
withTimeZone(TimeZone timezone)
Set the timezone for datestamps in the log
|
FormattedLogProvider.Builder |
withUTCTimeZone()
Set the timezone for datestamps in the log
|
public FormattedLogProvider.Builder withoutRenderingContext()
public FormattedLogProvider.Builder withUTCTimeZone()
public FormattedLogProvider.Builder withTimeZone(TimeZone timezone)
timezone - the timezone to use for datestampspublic FormattedLogProvider.Builder withDefaultLogLevel(Level level)
level - the log level to use as a defaultpublic FormattedLogProvider.Builder withLogLevel(String context, Level level)
Level for any Logs that match the specified context. Any Log context that
starts with the specified string will have its level set. For example, setting the level for the context org.neo4j
would result in that level being applied to Logs with the context org.neo4j.Foo, org.neo4j.foo.Bar, etc.context - the context of the Logs to set the level of, matching any Log context starting with this stringlevel - the log level to applypublic FormattedLogProvider.Builder withLogLevels(Map<String,Level> levels)
withLogLevel(String, Level) for every entry in the provided map.levels - a map containing paris of context and levelpublic FormattedLogProvider.Builder withoutAutoFlush()
public FormattedLogProvider toOutputStream(OutputStream out)
FormattedLogProvider instance that writes messages to an OutputStream.out - An OutputStream to write toFormattedLogProvider instance that writes to the specified OutputStreampublic FormattedLogProvider toOutputStream(org.neo4j.function.Supplier<OutputStream> outSupplier)
FormattedLogProvider instance that writes messages to OutputStreams obtained from the specified
Supplier. The OutputStream is obtained from the Supplier before every log message is written.outSupplier - A supplier for an output stream to write toFormattedLogProvider instancepublic FormattedLogProvider toWriter(Writer writer)
FormattedLogProvider instance that writes messages to a Writer.writer - A Writer to write toFormattedLogProvider instance that writes to the specified Writerpublic FormattedLogProvider toPrintWriter(PrintWriter writer)
FormattedLogProvider instance that writes messages to a PrintWriter.writer - A PrintWriter to write toFormattedLogProvider instance that writes to the specified PrintWriterpublic FormattedLogProvider toPrintWriter(org.neo4j.function.Supplier<PrintWriter> writerSupplier)
FormattedLogProvider instance that writes messages to PrintWriters obtained from the specified
Supplier. The PrintWriter is obtained from the Supplier before every log message is written.writerSupplier - A supplier for a PrintWriter to write toFormattedLogProvider instance that writes to the specified PrintWriterCopyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.