Package dk.netarkivet.monitor.logging
Class CachingSLF4JLogRecord
- java.lang.Object
-
- dk.netarkivet.monitor.logging.CachingSLF4JLogRecord
-
- All Implemented Interfaces:
SingleLogRecord
public class CachingSLF4JLogRecord extends Object implements SingleLogRecord
Cached log entry and JMX bean in one.
-
-
Constructor Summary
Constructors Constructor Description CachingSLF4JLogRecord(int index, CachingSLF4JAppender cachingSLF4JAppender)
Make a caching log record, that exposes a log record at a given index as an MBean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Unregisters this object as an mbean.String
getRecordString()
Get the log record on a given index from the top as a string.
-
-
-
Constructor Detail
-
CachingSLF4JLogRecord
public CachingSLF4JLogRecord(int index, CachingSLF4JAppender cachingSLF4JAppender)
Make a caching log record, that exposes a log record at a given index as an MBean.- Parameters:
index
- The index of this log record, counted from the top of the list.cachingSLF4JAppender
- The caching log handler this is an exposing view on.- Throws:
IOFailure
- on any trouble registering.
-
-
Method Detail
-
getRecordString
public String getRecordString()
Description copied from interface:SingleLogRecord
Get the log record on a given index from the top as a string. This will be formatted by some formatter, depending on implementation.- Specified by:
getRecordString
in interfaceSingleLogRecord
- Returns:
- A String representation of the LogRecord, or null for none.
-
close
public void close()
Unregisters this object as an mbean.
-
-