- java.lang.Object
-
- aeonics.entity.Entity
-
- aeonics.manager.Manager.Type
-
- aeonics.manager.Logger
-
- All Implemented Interfaces:
Exportable
,Snapshotable
public abstract class Logger extends Manager.Type
This entity manages the logs of the entire system. From anywhere, just call one of thelog()
variants.Manager.of(Logger.class).log(...);
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALL
Include all internal stack traces (-1)static int
CONFIG
Config checkup (700)static int
FINE
Fine details (500)static int
FINER
More tiny details (400)static int
FINEST
Most verbose (300)static int
INFO
Meaningful information (800)protected int
level
The current log levelstatic int
SEVERE
Severe errors (1000)static int
WARNING
Noteworthy warnings (900)
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
bindMessage(java.lang.String message, java.lang.Object... params)
Substitutes{}
in the message by the string representation of the parameters provided.void
config(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelCONFIG
void
config(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelCONFIG
void
config(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
config(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelCONFIG
void
config(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelCONFIG
void
config(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelCONFIG
void
config(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
config(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelCONFIG
void
fine(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINE
void
fine(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINE
void
fine(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
fine(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINE
void
fine(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINE
void
fine(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINE
void
fine(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
fine(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINE
void
finer(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINER
void
finer(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINER
void
finer(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
finer(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINER
void
finer(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINER
void
finer(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINER
void
finer(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
finer(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINER
void
finest(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINEST
void
finest(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINEST
void
finest(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
finest(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINEST
void
finest(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINEST
void
finest(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINEST
void
finest(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
finest(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINEST
protected abstract void
handle(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Implementations should override this method for actual logging.void
info(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelINFO
void
info(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelINFO
void
info(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
info(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelINFO
void
info(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelINFO
void
info(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelINFO
void
info(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
info(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelINFO
int
level()
Returns the current log levelvoid
level(int value)
Sets the current log levelvoid
log(int level, java.lang.Class<?> type, java.lang.Object o)
Log the specified object if the current level is smaller or equal to the specified level.void
log(int level, java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level.void
log(int level, java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level.void
log(int level, java.lang.Class<?> type, java.lang.Throwable t)
Log the specified exception if the current level is smaller or equal to the specified level.void
log(int level, java.lang.String type, java.lang.Object o)
Log the specified object if the current level is smaller or equal to the specified level.void
log(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level.void
log(int level, java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level.void
log(int level, java.lang.String type, java.lang.Throwable t)
Log the specified exception if the current level is smaller or equal to the specified level.java.lang.Class<? extends Manager.Type>
manager()
Hardcoded manager typeprotected java.lang.String
printStackTrace(java.lang.Throwable t)
Generates a string stack trace that omits alljava.*
oraeonics.*
frames unless the current log level isALL
.void
severe(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelSEVERE
void
severe(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelSEVERE
void
severe(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
severe(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelSEVERE
void
severe(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelSEVERE
void
severe(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelSEVERE
void
severe(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
severe(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelSEVERE
protected java.lang.String
toJson(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Converts the logging parameters to a JSON string representation by substituting optional parameters in the message.void
warning(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelWARNING
void
warning(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelWARNING
void
warning(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
warning(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelWARNING
void
warning(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelWARNING
void
warning(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelWARNING
void
warning(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
void
warning(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelWARNING
-
Methods inherited from class aeonics.manager.Manager.Type
category, internal
-
Methods inherited from class aeonics.entity.Entity
addRelation, addRelation, addRelation, cast, clearRelation, config, defineRelation, equals, export, firstRelation, hashCode, hasRelation, id, name, name, onCreate, onRemove, onUpdate, parameter, relations, relationships, removeRelation, snapshot, type, valueOf, valueOf
-
-
-
-
Field Detail
-
SEVERE
public static final int SEVERE
Severe errors (1000)- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
Noteworthy warnings (900)- See Also:
- Constant Field Values
-
INFO
public static final int INFO
Meaningful information (800)- See Also:
- Constant Field Values
-
CONFIG
public static final int CONFIG
Config checkup (700)- See Also:
- Constant Field Values
-
FINE
public static final int FINE
Fine details (500)- See Also:
- Constant Field Values
-
FINER
public static final int FINER
More tiny details (400)- See Also:
- Constant Field Values
-
FINEST
public static final int FINEST
Most verbose (300)- See Also:
- Constant Field Values
-
ALL
public static final int ALL
Include all internal stack traces (-1)- See Also:
- Constant Field Values
-
level
protected int level
The current log level
-
-
Method Detail
-
manager
public final java.lang.Class<? extends Manager.Type> manager()
Hardcoded manager type- Specified by:
manager
in classManager.Type
- Returns:
- the type of manager
-
level
public int level()
Returns the current log level- Returns:
- the current log level
-
level
public void level(int value)
Sets the current log level- Parameters:
value
- the current log level
-
log
public void log(int level, java.lang.Class<?> type, java.lang.Object o)
Log the specified object if the current level is smaller or equal to the specified level. Alias oflog(int, Class, String, Object...)
with levelSEVERE
- Parameters:
level
- the log level for this entrytype
- the class type this log entry relates too
- the object to log
-
log
public void log(int level, java.lang.Class<?> type, java.lang.Throwable t)
Log the specified exception if the current level is smaller or equal to the specified level.- Parameters:
level
- the log level for this entrytype
- the class type this log entry relates tot
- the exception to log
-
log
public void log(int level, java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level. By convention, the optional parameters are substituted in the message where "{}" is encountered, by order of appearance.- Parameters:
level
- the log level for this entrytype
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
log
public void log(int level, java.lang.String type, java.lang.Object o)
Log the specified object if the current level is smaller or equal to the specified level.- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates too
- the object to log
-
log
public void log(int level, java.lang.String type, java.lang.Throwable t)
Log the specified exception if the current level is smaller or equal to the specified level.- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates tot
- the exception to log
-
log
public void log(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level. By convention, the optional parameters are substituted in the message where "{}" is encountered, by order of appearance.- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
log
public void log(int level, java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level. By convention, the optional parameters are substituted in the message where "{}" is encountered, by order of appearance.- Parameters:
level
- the log level for this entrytype
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
log
public void log(int level, java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Log the specified message and optional other parameters if the current level is smaller or equal to the specified level. By convention, the optional parameters are substituted in the message where "{}" is encountered, by order of appearance.- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
severe
public void severe(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelSEVERE
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
severe
public void severe(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelSEVERE
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
severe
public void severe(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelSEVERE
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
severe
public void severe(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelSEVERE
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
severe
public void severe(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelSEVERE
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
severe
public void severe(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelSEVERE
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
severe
public void severe(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelSEVERE
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
severe
public void severe(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelSEVERE
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
warning
public void warning(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelWARNING
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
warning
public void warning(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelWARNING
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
warning
public void warning(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelWARNING
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
warning
public void warning(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelWARNING
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
warning
public void warning(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelWARNING
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
warning
public void warning(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelWARNING
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
warning
public void warning(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelWARNING
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
warning
public void warning(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelWARNING
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
info
public void info(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelINFO
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
info
public void info(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelINFO
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
info
public void info(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelINFO
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
info
public void info(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelINFO
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
info
public void info(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelINFO
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
info
public void info(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelINFO
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
info
public void info(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelINFO
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
info
public void info(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelINFO
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
config
public void config(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelCONFIG
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
config
public void config(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelCONFIG
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
config
public void config(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelCONFIG
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
config
public void config(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelCONFIG
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
config
public void config(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelCONFIG
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
config
public void config(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelCONFIG
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
config
public void config(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelCONFIG
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
config
public void config(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelCONFIG
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
fine
public void fine(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINE
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
fine
public void fine(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINE
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
fine
public void fine(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINE
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
fine
public void fine(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINE
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
fine
public void fine(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINE
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
fine
public void fine(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINE
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
fine
public void fine(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINE
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
fine
public void fine(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINE
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
finer
public void finer(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINER
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
finer
public void finer(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINER
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
finer
public void finer(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINER
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
finer
public void finer(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINER
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
finer
public void finer(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINER
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
finer
public void finer(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINER
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
finer
public void finer(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINER
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
finer
public void finer(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINER
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
finest
public void finest(java.lang.Class<?> type, java.lang.Object o)
Alias oflog(int,java.lang.Class<?>,java.lang.Object)
with levelFINEST
- Parameters:
type
- the class type this log entry relates too
- the object to log
-
finest
public void finest(java.lang.Class<?> type, java.lang.Throwable t)
Alias oflog(int,java.lang.Class<?>,java.lang.Throwable)
with levelFINEST
- Parameters:
type
- the class type this log entry relates tot
- the exception to log
-
finest
public void finest(java.lang.Class<?> type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.lang.Object...)
with levelFINEST
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
finest
public void finest(java.lang.String type, java.lang.Object o)
Alias oflog(int,java.lang.String,java.lang.Object)
with levelFINEST
- Parameters:
type
- the textual context this log entry relates too
- the object to log
-
finest
public void finest(java.lang.String type, java.lang.Throwable t)
Alias oflog(int,java.lang.String,java.lang.Throwable)
with levelFINEST
- Parameters:
type
- the textual context this log entry relates tot
- the exception to log
-
finest
public void finest(java.lang.String type, java.lang.String message, java.lang.Object... params)
Alias oflog(int,java.lang.String,java.lang.String,java.lang.Object...)
with levelFINEST
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
finest
public void finest(java.lang.Class<?> type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.Class<?>,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINEST
- Parameters:
type
- the class type this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
finest
public void finest(java.lang.String type, java.lang.String message, java.util.function.Supplier<java.lang.Object[]> supplier)
Alias oflog(int,java.lang.String,java.lang.String,java.util.function.Supplier<java.lang.Object[]>)
with levelFINEST
- Parameters:
type
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")supplier
- function that provides the optional parameters as an Object[]
-
handle
protected abstract void handle(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Implementations should override this method for actual logging. This method *should* only be called if the entry log level matches the current level- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log
-
toJson
protected java.lang.String toJson(int level, java.lang.String type, java.lang.String message, java.lang.Object... params)
Converts the logging parameters to a JSON string representation by substituting optional parameters in the message. This method is typically called from thehandle(int, String, String, Object...)
method.- Parameters:
level
- the log level for this entrytype
- the textual context this log entry relates tomessage
- the message to log (substitution placeholder is "{}")params
- optional additional parameters to log- Returns:
- the JSON string representation of this log entry
-
bindMessage
protected java.lang.String bindMessage(java.lang.String message, java.lang.Object... params)
Substitutes{}
in the message by the string representation of the parameters provided.- Parameters:
message
- the input messageparams
- the substitution parameters- Returns:
- the formatted message
-
printStackTrace
protected java.lang.String printStackTrace(java.lang.Throwable t)
Generates a string stack trace that omits alljava.*
oraeonics.*
frames unless the current log level isALL
.- Parameters:
t
- the exception for which to print the stack trace- Returns:
- the stack trace
-
-