public class FormattedLogProvider extends AbstractLogProvider<FormattedLog>
LogProvider implementation that applies a simple formatting to each log message.| Modifier and Type | Class and Description |
|---|---|
static class |
FormattedLogProvider.Builder
A Builder for a
FormattedLogProvider |
| Modifier and Type | Method and Description |
|---|---|
static FormattedLogProvider |
toOutputStream(OutputStream out)
Creates a
FormattedLogProvider instance that writes messages to an OutputStream. |
static FormattedLogProvider |
toOutputStream(Supplier<OutputStream> outSupplier)
Creates a
FormattedLogProvider instance that writes messages to OutputStreams obtained from the specified
Supplier. |
static FormattedLogProvider |
toPrintWriter(PrintWriter writer)
Creates a
FormattedLogProvider instance that writes messages to a PrintWriter. |
static FormattedLogProvider |
toPrintWriter(Supplier<PrintWriter> writerSupplier)
Creates a
FormattedLogProvider instance that writes messages to PrintWriters obtained from the specified
Supplier. |
static FormattedLogProvider |
toWriter(Writer writer)
Creates a
FormattedLogProvider instance that writes messages to a Writer. |
static FormattedLogProvider.Builder |
withDefaultLogLevel(Level level)
|
static FormattedLogProvider.Builder |
withoutAutoFlush()
Start creating a
FormattedLogProvider without auto flushing. |
static FormattedLogProvider.Builder |
withoutRenderingContext()
Start creating a
FormattedLogProvider which will not render the context (the class name or log name) in each output line. |
static FormattedLogProvider.Builder |
withTimeZone(TimeZone timeZone)
Deprecated.
|
static FormattedLogProvider.Builder |
withUTCTimeZone()
Start creating a
FormattedLogProvider with UTC timezone for datestamps in the log |
static FormattedLogProvider.Builder |
withZoneId(ZoneId zoneId)
Start creating a
FormattedLogProvider with the specified zoneId for datestamps in the log |
getLog, getLogpublic static FormattedLogProvider.Builder withoutRenderingContext()
FormattedLogProvider which will not render the context (the class name or log name) in each output line.
Use FormattedLogProvider.Builder.toOutputStream(java.io.OutputStream) to complete.FormattedLogProviderpublic static FormattedLogProvider.Builder withUTCTimeZone()
FormattedLogProvider with UTC timezone for datestamps in the logFormattedLogProviderpublic static FormattedLogProvider.Builder withZoneId(ZoneId zoneId)
FormattedLogProvider with the specified zoneId for datestamps in the logzoneId - FormattedLogProvider@Deprecated public static FormattedLogProvider.Builder withTimeZone(TimeZone timeZone)
withZoneId(ZoneId)FormattedLogProvider with the specified zoneId from timezone for datestamps in the logtimeZone - FormattedLogProviderpublic static FormattedLogProvider.Builder withDefaultLogLevel(Level level)
FormattedLogProvider with the specified log Level for all Logs by default.
Use FormattedLogProvider.Builder.toOutputStream(java.io.OutputStream) to complete.level - the log level to use as a defaultFormattedLogProviderpublic static FormattedLogProvider.Builder withoutAutoFlush()
FormattedLogProvider without auto flushing.
Use FormattedLogProvider.Builder.toOutputStream(java.io.OutputStream) to complete.FormattedLogProviderpublic static 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 static FormattedLogProvider toOutputStream(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 static 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 static 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 static FormattedLogProvider toPrintWriter(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–2018 The Neo4j Graph Database Project. All rights reserved.