public class SimpleLoggingFactory extends Object implements LoggingFactory
| Modifier and Type | Field and Description |
|---|---|
private static String |
CONSOLE_HANDLER |
private static boolean |
debug |
private static String |
FILE_HANDLER |
private static String |
FORMAT |
private static String |
HANDLERS |
private static String |
LEVEL |
private static String |
LOGGER |
private static String |
MEMORY_HANDLER |
private static String |
OldLogFormatter |
private static Properties |
props |
private static HashMap<String,Logger> |
sloggers |
private static String |
SOCKET_HANDLER |
| Constructor and Description |
|---|
SimpleLoggingFactory()
Default constructor (required).
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
configure(InputStream is) |
private static Handler |
createHandler(String classname,
Properties props) |
Level |
getDebugLevel()
Returns the Level object for DEBUG level.
|
Level |
getErrorLevel()
Returns the Level object for ERROR level.
|
Level |
getFatalLevel()
Returns the Level object for FATAL level.
|
Level |
getInfoLevel()
Returns the Level object for INFO level.
|
private static Integer |
getInteger(String name,
String dflt) |
Logger |
getLogger(String topic)
Find or create a logger for a named subsystem.
|
Level |
getWarnLevel()
Returns the Level object for WARN level.
|
void |
initialize(String debugDir,
String debugFileName)
The configuration file is first searched in the debugDir
If not defined, the configuration file is then searched from the search path used to load classes.
|
private static boolean |
isHandlerName(String name,
Vector<String> handlers) |
Level |
parse(String name)
Returns the Level object corresponding to specified name.
|
private static void |
setFilter(Handler handler,
String classname) |
private static void |
setFormatter(Handler handler,
String classname) |
private static boolean debug
private static final String HANDLERS
private static final String LEVEL
private static final String LOGGER
private static final String FORMAT
private static String OldLogFormatter
private static final String CONSOLE_HANDLER
private static final String FILE_HANDLER
private static final String MEMORY_HANDLER
private static final String SOCKET_HANDLER
private static Properties props
public SimpleLoggingFactory()
public Logger getLogger(String topic)
LoggingFactorygetLogger in interface LoggingFactorytopic - A name for the logger. This should be a dot-separated name and
should normally be based on the package name or class name of the subsystem.public Level getFatalLevel()
LoggingFactorygetFatalLevel in interface LoggingFactorypublic Level getErrorLevel()
LoggingFactorygetErrorLevel in interface LoggingFactorypublic Level getWarnLevel()
LoggingFactorygetWarnLevel in interface LoggingFactorypublic Level getInfoLevel()
LoggingFactorygetInfoLevel in interface LoggingFactorypublic Level getDebugLevel()
LoggingFactorygetDebugLevel in interface LoggingFactorypublic Level parse(String name)
LoggingFactoryparse in interface LoggingFactoryname - The level name, for example DEBUG or FATAL.public void initialize(String debugDir, String debugFileName)
initialize in interface LoggingFactoryprivate static Handler createHandler(String classname, Properties props) throws Exception
Exceptionprivate static void configure(InputStream is) throws Exception
ExceptionCopyright © 2022 ScalAgent D.T.. All rights reserved.