io.sarl.api.core
Capacity Logging
All Superinterfaces:
Capacity
All Known Implementing Classes:
LoggingSkill
capacity Logging
implements Capacity
Gives access to the logging mechanism associated to the agent.
Property Summary
Modifier and type Property and description
java.util.logging.Logger logger
Replies the backend logger.
int logLevel
Replies the logging level.
Action Summary
Modifier and type Action and description
abstract void debug(Supplier<T>)
Print the given message at debug logging level.
abstract void debug(Object,Object*)
Print the given message at debug logging level.
abstract void error(Supplier<T>)
Print the given message at error logging level.
abstract void error(Object,[Throwable],Object*)
Print the given message at error logging level.
abstract java.util.logging.Logger getLogger
Replies the backend logger.
abstract int getLogLevel
Replies the logging level.
abstract void info(Supplier<T>)
Print the given message at information logging level.
abstract void info(Object,Object*)
Print the given message at information logging level.
abstract boolean isDebugLogEnabled
Replies if the logging system is displaying the debugging messages.
abstract boolean isErrorLogEnabled
Replies if the logging system is displaying the errors.
abstract boolean isInfoLogEnabled
Replies if the logging system is displaying the information messages.
abstract boolean isWarningLogEnabled
Replies if the logging system is displaying the warnings.
abstract void println(Object)
Print the given message at information logging level.
Deprecated: Use info(Object,Object...).
abstract void setLoggingName(String)
Change the name used for logging.
abstract void setLogLevel(int)
Set the logging level.
abstract void warning(Supplier<T>)
Print the given message at warning logging level.
abstract void warning(Object,[Throwable],Object*)
Print the given message at warning logging level.
Property Details
logger
val logger : java.util.logging.Logger
Replies the backend logger.

This property is an alias for the action: getLogger

Returns:
the backend logger.
logLevel
var logLevel : int
Replies the logging level.

This property is an alias for the action: getLogLevel

Returns:
0 for no logging, 1 for error, 2 for warning, 3 for info, 5 for debug.
Action Details
debug(Supplier<T>)
def debug(Supplier<T>)
Print the given message at debug logging level.
Parameters:
messageProvider - provides the debug message.
Since:
0.7
debug(Object,Object*)
def debug(Object,Object*)
Print the given message at debug logging level.
Parameters:
message - the elements to display. The format of the message must follow MessageFormat.
parameters - the values to dynamically insert into the message.
error(Supplier<T>)
def error(Supplier<T>)
Print the given message at error logging level.
Parameters:
messageProvider - provides the error message.
Since:
0.7
error(Object,[Throwable],Object*)
def error(Object,[Throwable],Object*)
Print the given message at error logging level.
Parameters:
message - the elements to display. The format of the message must follow MessageFormat.
exception - the exception that is the cause of the error.
parameters - the values to dynamically insert into the message.
getLogger
def getLogger : java.util.logging.Logger
Replies the backend logger.
Returns:
the backend logger.
getLogLevel
def getLogLevel : int
Replies the logging level.
Returns:
0 for no logging, 1 for error, 2 for warning, 3 for info, 5 for debug.
info(Supplier<T>)
def info(Supplier<T>)
Print the given message at information logging level.
Parameters:
messageProvider - provides the info message.
Since:
0.7
info(Object,Object*)
def info(Object,Object*)
Print the given message at information logging level.
Parameters:
message - the elements to display. The format of the message must follow MessageFormat.
parameters - the values to dynamically insert into the message.
isDebugLogEnabled
def isDebugLogEnabled : boolean
Replies if the logging system is displaying the debugging messages.
Returns:
true if the debugging messages are logged, false if not.
isErrorLogEnabled
def isErrorLogEnabled : boolean
Replies if the logging system is displaying the errors.
Returns:
true if the errors are logged, false if not.
isInfoLogEnabled
def isInfoLogEnabled : boolean
Replies if the logging system is displaying the information messages.
Returns:
true if the information messages are logged, false if not.
isWarningLogEnabled
def isWarningLogEnabled : boolean
Replies if the logging system is displaying the warnings.
Returns:
true if the warnings are logged, false if not.
println(Object)
def println(Object)
Print the given message at information logging level.

This function is deprecated. Please use info(Object,Object...) in place of println.
Parameters:
message - the elements to display.
Deprecated:
Use info(Object,Object...) .
setLoggingName(String)
def setLoggingName(String)
Change the name used for logging.
Parameters:
name - the name used for logging.
setLogLevel(int)
def setLogLevel(int)
Set the logging level.
Parameters:
level - 0 or lower for no logging, 1 for error, 2 for warning, 3 for info, 4 or higher for debug.
warning(Supplier<T>)
def warning(Supplier<T>)
Print the given message at warning logging level.
Parameters:
messageProvider - provides the warning message.
Since:
0.7
warning(Object,[Throwable],Object*)
def warning(Object,[Throwable],Object*)
Print the given message at warning logging level.
Parameters:
message - the elements to display. The format of the message must follow MessageFormat.
exception - the exception that is the cause of the error.
parameters - the values to dynamically insert into the message.