com.newstep.solid.management.runtime.component
public class ComponentLogger
Utility class to aid in creation of Component file logger
An
implementation of an mbean that facilitates in setting runtime log levels.
Author:
msimonsen
Implements:
ComponentLoggerMBean
Links:
Implementation Implementation Link
Utility class to aid in creation of Component file logger
An
implementation of an mbean that facilitates in setting runtime log levels.
Author:
msimonsen
| Nested Class Summary |
class |
|
| Field Summary |
private final static String |
|
private ConsoleHandler |
|
private String |
|
private static String |
|
private static boolean |
|
private static int |
|
private static int |
|
private static String |
|
private FileHandler |
|
private boolean |
|
private boolean |
|
private static String |
|
private final static Logger |
|
| Constructor Summary |
public void |
|
| Method Summary |
protected void |
|
public String |
|
public String |
|
protected void |
initLogger(String loggerFile, String level, Formatter formatter) |
public int |
|
private static Level |
|
public void |
|
public void |
|
public void |
|
public void |
|
private final static String className
Final.
Multiplicity:
1
Static.
private ConsoleHandler consoleHandler
Multiplicity:
1
private String curDisplayLevel
Multiplicity:
1
private static String DEFAULT_INIT_LOGGER
Multiplicity:
1
Static.
private static boolean DEFAULT_LOG_APPEND
Multiplicity:
1
Static.
private static int DEFAULT_LOG_SIZE
Multiplicity:
1
Static.
private static int DEFAULT_NUM_LOG_FILES
Multiplicity:
1
Static.
private static String exceptions
Multiplicity:
1
Static.
private FileHandler fileHandler
Multiplicity:
1
private boolean isConsoleHandler
Multiplicity:
1
private boolean isInit
Multiplicity:
1
private static String TRACE_LEVELS
CSN specific trace levels - TODO - change to its in CSN package
Multiplicity:
1
Static.
private final static Logger _logger
Final.
Multiplicity:
1
Static.
public void ComponentLogger ()
Ensures that configuration has at least a console handler installed.
Stereotype:
create
protected void close ()
public String getLevel ()
public String getLevel (String pkgName)
protected void initLogger (String loggerFile, String level, Formatter formatter)
Initializes a File handler with a level. Will attempt to set the level,
even on an illegal argument is passed in.
Parameters:
loggerFile
level
formatter -
File formatter.
Throws:
IOException,ConfigurationException
private static Level parse (String level)
Static.
public void resetGlobalLevel (String level)
public void resetLevel (String level, String pkgName)
Attempts to set the levels across file handlers - not only the one that
is initialized - this could be a problem
public void setLevel (String pkgName, String level)
public void setLevel (String level)