io.sarl.sre.janus.services.logging.jul
Class JulLoggingService
All Superinterfaces:
LoggingService, org.arakhne.afc.services.IService
@javax.inject.Singleton
class JulLoggingService
extends java.lang.Object
implements LoggingService
This class enables to log information by ensuring that the values of the parameters are not evaluated until the information should be really log, according to the log level. The logger is injected.

The LoggingService considers the parameters of the functions as:
  • the message is the the message in the property file;
  • the parameters are the values that will replace the strings {0}, {1}, {2}... in the text extracted from the resource property.

If a Throwable is passed as parameter, the text of the exception is retrieved.

If a Callable is passed as parameter, the object is automatically called.

If a LogParam is passed as parameter, the toString function will be invoked.

For all the other objects, the toString() function is invoked.

This service is thread-safe.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Property Summary
Modifier and type Property and description
java.util.logging.Logger kernelLogger
java.util.logging.Logger platformLogger
java.lang.Class<T> referenceType
Constructor Summary
Constructor and description
new(JulLoggerCreator)
Constructor.
Action Summary
Modifier and type Action and description
java.util.logging.Logger createAgentLogger(String,[Level])
java.util.logging.Logger getKernelLogger
java.util.logging.Logger getKernelModuleLogger(String)
java.util.logging.Logger getPlatformLogger
java.lang.Class<T> getReferenceType
Property Details
kernelLogger
val kernelLogger : java.util.logging.Logger

This property is an alias for the action: getKernelLogger

platformLogger
val platformLogger : java.util.logging.Logger

This property is an alias for the action: getPlatformLogger

referenceType
val referenceType : java.lang.Class<T>

This property is an alias for the action: getReferenceType

Constructor Details
new(JulLoggerCreator)
new(JulLoggerCreator)
Constructor.
Parameters:
loggerCreator - the creator.
Action Details
createAgentLogger(String,[Level])
def createAgentLogger(String,[Level]) : java.util.logging.Logger
getKernelLogger
def getKernelLogger : java.util.logging.Logger
getKernelModuleLogger(String)
def getKernelModuleLogger(String) : java.util.logging.Logger
getPlatformLogger
def getPlatformLogger : java.util.logging.Logger
getReferenceType
def getReferenceType : java.lang.Class<T>