public static class FormattedLog.Builder extends Object
FormattedLog| Modifier and Type | Method and Description |
|---|---|
FormattedLog |
toOutputStream(OutputStream out)
Creates a
FormattedLog instance that writes messages to an OutputStream. |
FormattedLog |
toOutputStream(Supplier<OutputStream> outSupplier)
Creates a
FormattedLog instance that writes messages to OutputStreams obtained from the specified
Supplier. |
FormattedLog |
toPrintWriter(PrintWriter writer)
Creates a
FormattedLog instance that writes messages to a PrintWriter. |
FormattedLog |
toPrintWriter(Supplier<PrintWriter> writerSupplier)
Creates a
FormattedLog instance that writes messages to PrintWriters obtained from the specified
Supplier. |
FormattedLog |
toWriter(Writer writer)
Creates a
FormattedLog instance that writes messages to a Writer. |
FormattedLog.Builder |
usingLock(Object lock)
Use the specified object to synchronize on.
|
FormattedLog.Builder |
withCategory(String category)
Include the specified category in each output log line.
|
FormattedLog.Builder |
withLogLevel(Level level)
Use the specified log
Level as a default. |
FormattedLog.Builder |
withoutAutoFlush()
Disable auto flushing.
|
FormattedLog.Builder |
withTimeZone(TimeZone timezone)
Set the timezone for datestamps in the log
|
FormattedLog.Builder |
withUTCTimeZone()
Set the timezone for datestamps in the log
|
public FormattedLog.Builder withUTCTimeZone()
public FormattedLog.Builder withTimeZone(TimeZone timezone)
timezone - the timezone to use for datestampspublic FormattedLog.Builder usingLock(Object lock)
lock - the object to synchronize onpublic FormattedLog.Builder withCategory(String category)
category - the category to include ing each output linepublic FormattedLog.Builder withLogLevel(Level level)
Level as a default.level - the log level to use as a defaultpublic FormattedLog.Builder withoutAutoFlush()
public FormattedLog toOutputStream(OutputStream out)
FormattedLog instance that writes messages to an OutputStream.out - An OutputStream to write toFormattedLog instance that writes to the specified OutputStreampublic FormattedLog toOutputStream(Supplier<OutputStream> outSupplier)
FormattedLog 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 toFormattedLog instancepublic FormattedLog toWriter(Writer writer)
FormattedLog instance that writes messages to a Writer.writer - A Writer to write toFormattedLog instance that writes to the specified Writerpublic FormattedLog toPrintWriter(PrintWriter writer)
FormattedLog instance that writes messages to a PrintWriter.writer - A PrintWriter to write toFormattedLog instance that writes to the specified PrintWriterpublic FormattedLog toPrintWriter(Supplier<PrintWriter> writerSupplier)
FormattedLog 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 toFormattedLog instance that writes to the specified PrintWriterCopyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.