io.sarl.sre.janus.services.logging.jul
Class JulLoggerCreator
class JulLoggerCreator
extends java.lang.Object
Helper for creating a JUL logger.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Property Summary
Modifier and type Property and description
java.util.logging.Level defaultLevel
protected LoggingConfig loggingConfig
java.util.logging.Formatter platformFormatter
Replies the log formatter for the SRE kernel.
protected java.lang.String programName
Field Summary
Modifier and type Field and description
public static val java.lang.String PLATFORM_LOGGER_NAME_PREFIX
Prefix for the logger names.
Constructor Summary
Constructor and description
new(Level,Provider<T>,[Function1<Param,Result>])
Build a logger creator.
Action Summary
Modifier and type Action and description
java.util.logging.Logger createModuleLogger([String],Logger)
Create a logger with the given name for a platform module (kernel or agent).
protected java.util.logging.Formatter createPlatformFormatter
Create a formatter for the SRE kernel.
java.util.logging.Logger createPlatformLogger
Create a logger for the platform.
java.util.logging.Level getDefaultLevel
protected LoggingConfig getLoggingConfig
java.util.logging.Formatter getPlatformFormatter
Replies the log formatter for the SRE kernel.
protected java.lang.String getProgramName
void setPlatformFormatter(Formatter)
Change the log formatter for the SRE kernel.
Property Details
defaultLevel
val defaultLevel : java.util.logging.Level

This property is an alias for the action: getDefaultLevel

loggingConfig
protected val loggingConfig : LoggingConfig

This property is an alias for the action: getLoggingConfig

platformFormatter
var platformFormatter : java.util.logging.Formatter
Replies the log formatter for the SRE kernel.

This property is an alias for the action: getPlatformFormatter

Returns:
the log formatter, never null .
programName
protected val programName : java.lang.String

This property is an alias for the action: getProgramName

Field Details
PLATFORM_LOGGER_NAME_PREFIX
public static val PLATFORM_LOGGER_NAME_PREFIX : java.lang.String = "Janus-SRE-"
Prefix for the logger names.
Constructor Details
new(Level,Provider<T>,[Function1<Param,Result>])
new(Level,Provider<T>,[Function1<Param,Result>])
Build a logger creator.
Parameters:
defaultLevel - the logging level for new loggers.
configProvider - the provider of SRE configuration.
loggerProvider - the provider of loggers to use; if null, the default JUL log manager is used.
Action Details
createModuleLogger([String],Logger)
def createModuleLogger([String],Logger) : java.util.logging.Logger
Create a logger with the given name for a platform module (kernel or agent).
Parameters:
name - the name of the new logger. If null, the default program name is used.
parent - the parent logger.
Returns:
the logger.
Since:
0.7.0
createPlatformFormatter
protected def createPlatformFormatter : java.util.logging.Formatter
Create a formatter for the SRE kernel.
Returns:
the newly created instance of formatter.
createPlatformLogger
def createPlatformLogger : java.util.logging.Logger
Create a logger for the platform.
Returns:
the logger.
Since:
0.7.0
getDefaultLevel
def getDefaultLevel : java.util.logging.Level
getLoggingConfig
protected def getLoggingConfig : LoggingConfig
getPlatformFormatter
def getPlatformFormatter : java.util.logging.Formatter
Replies the log formatter for the SRE kernel.
Returns:
the log formatter, never null .
getProgramName
protected def getProgramName : java.lang.String
setPlatformFormatter(Formatter)
def setPlatformFormatter(Formatter)
Change the log formatter for the SRE kernel.
Parameters:
formatter - the log formatter, or null to use the default.