public class LogChannelCache
extends java.lang.Object
LogPrinter
objects): the system-console,
a log-file and a GUI log-frame. Note that each output can be configured
individually with respect to the log-level and message formatting.
// sample tracing for the DBO log channel LogChannel logCh = Log.getLogChannel("DBO"); logCh.setLogLevel(DUMP); LogPrinterConsole logConsole = logCh.openConsole(); logConsole.setLogLevel(ERROR); LogPrinterFile logFile = logCh.openLogFile(logDir); logFile.setLogLevel(VERBOSE); LogPrinterFrame logFrame = logCh.openLogFrame("DBO-Log"); logFrame.setLogLevel(LOG_INFO); logFrame.registerForExit(this); logCh.logInfo(this, "");
Constructor and Description |
---|
LogChannelCache() |
Modifier and Type | Method and Description |
---|---|
static void |
close()
Closes all cached LogChannels and removes them from the cache.
|
static void |
closeLogChannel(java.lang.String channelName)
Closes the named log channel by removing it from the cached list.
|
static LogChannel |
getLogChannel(java.lang.String channelName)
Opens a named channel for sending messages to.
|
static boolean |
hasLogChannel(java.lang.String channelName)
Tells whether a LogChannel with this name exists already.
|
public static LogChannel getLogChannel(java.lang.String channelName)
public static boolean hasLogChannel(java.lang.String channelName)
public static void closeLogChannel(java.lang.String channelName)
public static void close()
Copyright © 2012 EsprIT-Systems. All Rights Reserved.