Package omero.log
Interface Logger
-
- All Known Implementing Classes:
NullLogger
,SimpleLogger
public interface Logger
Defines the log service interface. Operations are defined to log messages according the severity of the event:- DEBUG: all debug messages.
- INFO: regular log messages that inform about normal application workflow.
- WARN: messages emitted in case of abnormal or suspect application behavior.
- ERROR: all error conditions and failures that can be recovered.
- FATAL: severe failures that require the application to terminate.
Every method takes in two parameters: the originator of the log message and the log message itself. If the message spans multiple lines, then a
LogMessage
object should be used to construct it.A configuration file (in the configuration directory under the installation directory) provides for fine-tuning of the log settings on a per-class basis. Those settings include the choice of output locations and verbosity based on priority levels DEBUG has a lower priority than INFO, which, in turn, is lower priority than WARN, and so on.
The implementation of the service is thread-safe. Methods can be called from different threads without compromising the integrity of the log records.
- Since:
- OME2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
debug(java.lang.Object originator, java.lang.String logMsg)
Logs a debug message.void
debug(java.lang.Object originator, LogMessage msg)
Logs a debug message.void
error(java.lang.Object originator, java.lang.String logMsg)
Logs an error message.void
error(java.lang.Object originator, LogMessage msg)
Logs an error message.void
fatal(java.lang.Object originator, java.lang.String logMsg)
Logs a fatal message.void
fatal(java.lang.Object originator, LogMessage msg)
Logs a fatal message.java.lang.String
getLogFile()
Returns the log file.void
info(java.lang.Object originator, java.lang.String logMsg)
Logs an info message.void
info(java.lang.Object originator, LogMessage msg)
Logs an info message.void
warn(java.lang.Object originator, java.lang.String logMsg)
Logs a warn message.void
warn(java.lang.Object originator, LogMessage msg)
Logs a warn message.
-
-
-
Method Detail
-
debug
void debug(java.lang.Object originator, java.lang.String logMsg)
Logs a debug message.- Parameters:
originator
- The originator of the message.logMsg
- The log message.
-
debug
void debug(java.lang.Object originator, LogMessage msg)
Logs a debug message.- Parameters:
originator
- The originator of the message.msg
- The log message.
-
info
void info(java.lang.Object originator, java.lang.String logMsg)
Logs an info message.- Parameters:
originator
- The originator of the message.logMsg
- The log message.
-
info
void info(java.lang.Object originator, LogMessage msg)
Logs an info message.- Parameters:
originator
- The originator of the message.msg
- The log message.
-
warn
void warn(java.lang.Object originator, java.lang.String logMsg)
Logs a warn message.- Parameters:
originator
- The originator of the message.logMsg
- The log message.
-
warn
void warn(java.lang.Object originator, LogMessage msg)
Logs a warn message.- Parameters:
originator
- The originator of the message.msg
- The log message.
-
error
void error(java.lang.Object originator, java.lang.String logMsg)
Logs an error message.- Parameters:
originator
- The originator of the message.logMsg
- The log message.
-
error
void error(java.lang.Object originator, LogMessage msg)
Logs an error message.- Parameters:
originator
- The originator of the message.msg
- The log message.
-
fatal
void fatal(java.lang.Object originator, java.lang.String logMsg)
Logs a fatal message.- Parameters:
originator
- The originator of the message.logMsg
- The log message.
-
fatal
void fatal(java.lang.Object originator, LogMessage msg)
Logs a fatal message.- Parameters:
originator
- The originator of the message.msg
- The log message.
-
getLogFile
java.lang.String getLogFile()
Returns the log file.- Returns:
- See above.
-
-