Package com.illumon.iris.db.v2.utils
Class AsyncErrorLogger
java.lang.Object
com.illumon.iris.db.v2.utils.AsyncErrorLogger
public class AsyncErrorLogger extends Object
A static implementation for simple, ephemeral, error recording within a single query. Errors recorded by
InstrumentedListener
s
will be appended to an in memory table, which can be retrieved via getErrorLog()
-
Constructor Summary
Constructors Constructor Description AsyncErrorLogger()
-
Method Summary
Modifier and Type Method Description static DynamicTable
getErrorLog()
Get the in-memory error table.static void
log(DBDateTime time, UpdatePerformanceTracker.Entry entry, UpdatePerformanceTracker.Entry sourceEntry, Throwable originalException)
Write a row describing an error to the error logging table.
-
Constructor Details
-
AsyncErrorLogger
public AsyncErrorLogger()
-
-
Method Details
-
getErrorLog
Get the in-memory error table.- Returns:
- the error
table
-
log
public static void log(@NotNull DBDateTime time, @Nullable UpdatePerformanceTracker.Entry entry, @Nullable UpdatePerformanceTracker.Entry sourceEntry, @NotNull Throwable originalException) throws IOExceptionWrite a row describing an error to the error logging table.- Parameters:
time
- the time the error occurredentry
- theUpdatePerformanceTracker.Entry
describing the failed operationsourceEntry
- the parentUpdatePerformanceTracker.Entry
originalException
- the exception to record- Throws:
IOException
- if an error occurs while writing to the table.
-