Class SystemLog
java.lang.Object
fc.io.Log
fc.io.SystemLog
A default implementation of
Log that provides logging to a
PrintStream destination and is intended for sending normal application
logs to System.{out, error}
Messages written to output destinations depend upon the flushing policy of the output destination. Destinations that use System.{err,out} will flush messages after every log method invocation.
This class should be sufficient for all logging tasks. However custom
loggers that subclass Log can also be written if really desired.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SystemLog with a default destination of System.err and a default level ofLog.DEFAULT_LEVELSystemLog(String name, PrintStream out) Creates a new SystemLog with the specified destination and a default level ofLog.DEFAULT_LEVELSystemLog(String name, PrintStream out, LogLevel loglevel) Creates a new SystemLog. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the log by flushing the destination PrintStream.voidvoidvoidvoidvoidvoidvoidlog(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7) voidlog(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7, Object str8) voidlog(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7, Object str8, Object... args) static voidMethods inherited from class Log
bug, bug, bug, bug, bug, bug, bug, bug, canLog, closeLog, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, get, get, get, getDebugContext, getDefault, getLevel, getLevelNames, getLog, getName, info, info, info, info, info, info, info, info, logSystemInfo, printLevelName, printMethodInfoAtLevel, printRelativeTimestamp, printTimestamp, setDefaultLevel, setDefaultLevel, setLevel, setLevel, setLevelForAll, toString, warn, warn, warn, warn, warn, warn, warn, warn
-
Constructor Details
-
SystemLog
Creates a new SystemLog with a default destination of System.err and a default level ofLog.DEFAULT_LEVEL- Parameters:
name- name of this log (any arbitrary string)
-
SystemLog
Creates a new SystemLog with the specified destination and a default level ofLog.DEFAULT_LEVEL- Parameters:
name- name of this log (any arbitrary string)out- the output destination
-
SystemLog
Creates a new SystemLog. The newly created log will automatically add itself to the list of all logs maintained byLogand a subsequent call toLog.get(String)with the same name will return this log.- Parameters:
name- name of this log (any arbitrary string)out- the output destinationloglevel- the logging level
-
-
Method Details
-
close
-
log
- Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
- Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
- Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
- Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
- Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
public void log(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6) - Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
public void log(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7) - Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
public void log(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7, Object str8) - Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
log
public void log(LogLevel level, Object str1, Object str2, Object str3, Object str4, Object str5, Object str6, Object str7, Object str8, Object... args) - Specified by:
login classLog- Parameters:
level- the current log level. This can be logged as well.str1- unless overridden in a subclass, this is the value returned byLog.getDebugContext(fc.io.LogLevel,int)and is generated automatically by the warn(), info(), debug() etc., methods
-
main
-