fc.io
Class SystemLog
java.lang.Object
fc.io.Log
fc.io.SystemLog
public class SystemLog
- extends Log
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.
|
Method Summary |
void |
close()
Closes the log by flushing the destination PrintStream. |
void |
log(LogLevel level,
Object str1)
|
void |
log(LogLevel level,
Object str1,
Object str2)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4,
Object str5)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4,
Object str5,
Object str6)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4,
Object str5,
Object str6,
Object str7)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4,
Object str5,
Object str6,
Object str7,
Object str8)
|
void |
log(LogLevel level,
Object str1,
Object str2,
Object str3,
Object str4,
Object str5,
Object str6,
Object str7,
Object str8,
Object... args)
|
static void |
main(String[] args)
|
| Methods inherited from class fc.io.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, 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 |
SystemLog
public SystemLog(String name,
PrintStream out,
LogLevel loglevel)
- Creates a new SystemLog. The newly created log will automatically add
itself to the list of all logs maintained by
Log and a subsequent
call to Log.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
close
public void close()
- Closes the log by flushing the destination PrintStream.
close() is not called on the PrintStream
since it would make PrintStreams like System.out
unusable by other code.
- Specified by:
close in class Log
log
public void log(LogLevel level,
Object str1)
- Specified by:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext and
is generated automatically by the warn(),
info(), debug() etc., methods
log
public void log(LogLevel level,
Object str1,
Object str2)
- Specified by:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext and
is generated automatically by the warn(),
info(), debug() etc., methods
log
public void log(LogLevel level,
Object str1,
Object str2,
Object str3)
- Specified by:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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)
- Specified by:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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)
- Specified by:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext 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:
log in class Log
- Parameters:
level - the current log level. This can be logged
as well.str1 - unless overridden in a subclass, this is the
value returned by getDebugContext and
is generated automatically by the warn(),
info(), debug() etc., methods
main
public static void main(String[] args)
throws Exception
- Throws:
Exception