public class LogEntry
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getData()
Any attached object that you would want the data from
|
java.util.Date |
getDate()
Returns the date of this log entry
|
java.text.SimpleDateFormat |
getDateFormatter()
Returns the current formatter for the date
|
static java.util.Map<LogProperties,java.lang.Boolean> |
getDisplayedProperties()
Configuration for the log properties that are displayed
|
static java.util.List<java.lang.String> |
getExceptionHighlightedPackages()
Exception packages that get highlighted
|
java.util.logging.Level |
getLevel()
Gets the level of this log entry
|
java.lang.String |
getMessage()
Returns the message for this log entry
|
@NotNull java.lang.String |
getOriginalSourceSystemID()
The original source system id
|
@NotNull java.util.List<LogProperty> |
getProperties()
*
Returns the properties of this log entry
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertiesFromMessage(java.lang.String message)
Returns the properties map form this log entry
|
LogProperty |
getProperty(java.lang.String name)
Returns a specific log property
|
static java.util.regex.Pattern |
getPropertyPattern()
Returns the actual pattern
|
static LogEntry |
newEntry()
Creates a new log entry with all global properties attached
|
static LogEntry |
newEntry(java.util.logging.LogRecord record)
Creates a new log entry with all global properties attached
|
static java.lang.String |
padLeft(java.lang.String s,
int n)
Pads the property field or value by the number
|
static java.lang.String |
padRight(java.lang.String s,
int n)
Pads a property field or value by so many digits
|
LogEntry |
setData(java.lang.Object data)
Any attached object you would want to fetch data from
|
LogEntry |
setDate(java.util.Date date)
Sets the date of this log entry
|
LogEntry |
setLevel(java.util.logging.Level level)
Sets the level of this log entry
|
LogEntry |
setMessage(java.lang.String message)
Returns the message for this entry
|
LogEntry |
setOriginalSourceSystemID(java.lang.String originalSourceSystemID)
The original source system id
|
@NotNull LogEntry |
setProperties(@NotNull java.util.List<LogProperty> properties)
Sets the properties of this log entry
|
java.lang.String |
toString()
Returns the log entry with the square brackets
|
@NotNull public @NotNull java.util.List<LogProperty> getProperties()
@NotNull public @NotNull LogEntry setProperties(@NotNull @NotNull java.util.List<LogProperty> properties)
properties - A list of properties to set for this listpublic static LogEntry newEntry(java.util.logging.LogRecord record)
record - A log record produced by java loggingpublic static LogEntry newEntry()
public static java.lang.String padRight(java.lang.String s,
int n)
s - the stringn - number of digitspublic java.util.Map<java.lang.String,java.lang.String> getPropertiesFromMessage(java.lang.String message)
message - The message to break into key property pairspublic static java.lang.String padLeft(java.lang.String s,
int n)
s - the stringn - the number of chars topublic static java.util.regex.Pattern getPropertyPattern()
public static java.util.Map<LogProperties,java.lang.Boolean> getDisplayedProperties()
public static java.util.List<java.lang.String> getExceptionHighlightedPackages()
public java.text.SimpleDateFormat getDateFormatter()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getMessage()
public java.util.logging.Level getLevel()
public LogEntry setLevel(java.util.logging.Level level)
level - The levelpublic java.util.Date getDate()
public java.lang.Object getData()
public LogEntry setData(java.lang.Object data)
data - Any data with this entrypublic LogEntry setDate(java.util.Date date)
date - The date of this entrypublic LogEntry setMessage(java.lang.String message)
message - Sets the message unmapped into a log entry from bracket form@NotNull public @NotNull java.lang.String getOriginalSourceSystemID()
public LogEntry setOriginalSourceSystemID(java.lang.String originalSourceSystemID)
originalSourceSystemID - The original source systempublic LogProperty getProperty(java.lang.String name)
name - The name of the propertyCopyright © 2020 Marc Magon. All rights reserved.