Package io.deephaven.base.log
Interface LogOutput
- All Known Subinterfaces:
LogEntry
- All Known Implementing Classes:
DelayedLogEntryImpl
,DelayedLogEntryImpl2
,LogEntry.Null
,LogEntryImpl
,LogOutput.Null
,LogOutputBaseImpl
,LogOutputCsvImpl
,LogOutputStringImpl
public interface LogOutput
Collects output for efficient textual logging. The append methods are intended to behave like StringBuilder to the
extent possible, but the fast loggers make no pretense about handling Unicode or producing anything but good old
ASCII.
Note that although the output will probably be single byte ASCII, we behave like StringBuilder and by the standard overload and promotion rules appending a byte actually appends an integer ("65") not a character ("A").
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static class
static interface
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LogOutput.ObjFormatter<LogOutputAppendable[]>
Formats an array of LogOutputAppendable instancesstatic final LogOutput.ObjFormatter<Collection<? extends LogOutputAppendable>>
Formats a Collection of LogOutputAppendable instancesstatic final LogOutput.ObjFormatter<Object>
Formats an arbitrary object similar to Object.toString()static final LogOutput.ObjFormatter<boolean[]>
Formats a boolean arraystatic final LogOutput.ObjFormatter<int[]>
Formats an int arraystatic final LogOutput.ObjFormatter<LocalDateTime>
Formats LocalDateTime based on the default timezonestatic final LogOutput.LongFormatter
Formats long millis from epoch based on the default timezonestatic final TimestampBuffer
static final LogOutput.Null
static final LogOutput.ObjFormatter<byte[]>
Formats byte array as a null-terminated stringstatic final LogOutput.ObjFormatter<SocketAddress>
Formats an InetSocketAddressstatic final LogOutput.ObjFormatter<String[]>
Formats a String arraystatic final LogOutput.ObjFormatter<Collection<String>>
Formats a String Collection -
Method Summary
Modifier and TypeMethodDescriptionappend
(boolean b) append
(byte[] ba) append
(byte[] ba, byte terminator) append
(byte[] ba, int pos, int length) append
(char c) append
(int i) append
(long l) append
(short s) append
(LogOutput.LongFormatter formatter, long n) <T> LogOutput
append
(LogOutput.ObjFormatter<T> objFormatter, T t) <T> LogOutput
append
(LogOutput.ObjIntIntFormatter<T> objFormatter, T t, int nOffset, int nLength) <T,
U> LogOutput append
(LogOutput.ObjObjFormatter<T, U> objObjFormatter, T t, U u) append
(LogOutputAppendable appendable) default LogOutput
default LogOutput
append
(CharSequence seq) append
(CharSequence seq, int start, int length) default LogOutput
default LogOutput
default LogOutput
append
(ByteBuffer bb) Appends the character equivalent of each byte remaining in the given ByteBuffer ([65 66 67] == "ABC" not "656667"), but does not modify the mark, position, or limit of the ByteBuffer.appendDouble
(double f) default LogOutput
appendTimestamp
(long utcMillis, TimestampBuffer tb) appendTimestampMicros
(long utcMicros, TimestampBufferMicros tb) clear()
close()
getBuffer
(int i) int
int
nf()
nl()
int
int
size()
start()
-
Field Details
-
millisFormatter
-
BASIC_FORMATTER
Formats an arbitrary object similar to Object.toString() -
SOCKADDR_FORMATTER
Formats an InetSocketAddress -
INT_ARRAY_FORMATTER
Formats an int array -
STRING_ARRAY_FORMATTER
Formats a String array -
STRING_COLLECTION_FORMATTER
Formats a String Collection -
APPENDABLE_ARRAY_FORMATTER
Formats an array of LogOutputAppendable instances -
APPENDABLE_COLLECTION_FORMATTER
static final LogOutput.ObjFormatter<Collection<? extends LogOutputAppendable>> APPENDABLE_COLLECTION_FORMATTERFormats a Collection of LogOutputAppendable instances -
BOOLEAN_ARRAY_FORMATTER
Formats a boolean array -
NULL_TERMINATED_STRING_FORMATTER
Formats byte array as a null-terminated string -
LOCAL_DATE_TIME_FORMATTER
Formats LocalDateTime based on the default timezone -
MILLIS_FROM_EPOCH_FORMATTER
Formats long millis from epoch based on the default timezone -
NULL
-
-
Method Details
-
start
LogOutput start() -
append
-
append
-
append
-
append
-
append
-
appendDouble
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
Appends the character equivalent of each byte remaining in the given ByteBuffer ([65 66 67] == "ABC" not "656667"), but does not modify the mark, position, or limit of the ByteBuffer. -
appendTimestamp
-
appendTimestampMicros
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
appendDouble
-
markEndOfHeader
LogOutput markEndOfHeader() -
getEndOfHeaderOffset
int getEndOfHeaderOffset() -
nf
LogOutput nf() -
nl
LogOutput nl() -
close
LogOutput close() -
relativeSize
int relativeSize() -
size
int size() -
getBufferCount
int getBufferCount() -
getBuffer
-
clear
LogOutput clear()
-