public class Subsystem extends Agent
This object will register itself on the three buses (control, status, log). It broadcasts its status, and can receive Commands.
Agent.RunningCommand, Agent.ShutdownResultAGENT_DESCRIPTION, AGENT_RUNTIMEINFO_TASK, commandExecutorLock, currentAction, currentQueries, currentSignals, jvmShutdown, logBusHandler, stateService, treeComponentInitialized| Constructor and Description |
|---|
Subsystem(String name,
AgentInfo.AgentType type)
Constructs a Subsystem of a given type with no inner structure.
|
| Modifier and Type | Method and Description |
|---|---|
Handler |
getLogHandler(String handlerName)
Get a LogHandler for a given name.
|
Level |
getLogHandlerLevel(String handlerName)
Command to get the level for a given handler.
|
Level |
getLogLevel(String keyLogger)
Command to get the Level of a named Logger.
|
int |
getNumberCommandThreads()
Command that returns the number of currently running commands.
|
boolean |
isLogLevelInherited(String keyLogger)
Command to check if the Level of a named Logger is inherited.
|
void |
ping()
Command to broadcast a message of presence on the status bus.
|
String |
printLoggersLevel() |
String |
printLogHandlersLevel() |
String |
printRunningCommands()
Command returning a String describing which commands are running.
|
void |
setLogFormat(String format)
Command to set a format for the TextFormatter of LogBusHandler (see
logging.properties doc).
|
void |
setLogHandlerLevel(String handlerName,
String level)
Command to set a level for a given handler
Internally we use
java.util.logging.Level#parse(String) to parse the Level corresponding to the provided String. |
void |
setLogLevel(String keyLogger,
String levelName)
Command to set the Level of a named Logger.
|
void |
setStackTraceDepth(int depth)
Will modify the depth of stackTrace printing for ALL handlers (including
the LogBusHandler)
|
createHelper, executeCommandRequest, getAgentInfo, getAgentPersistenceService, getAgentService, getAgentServices, getCommandCount, getComponentConfigurationEnvironment, getComponentConfigurationEnvironmentByName, getComponentLookup, getCurrentAction, getDescription, getEnvironmentLockService, getEnvironmentMessagingAccess, getLogger, getMessagingAccess, getName, getScheduler, helper, initAgent, initLogBusHandler, isInEngineeringMode, populateComponentLookup, preInit, preStart, printComponentNodeTree, publishSubsystemDataOnStatusBus, sendAck, sendNack, sendStatusMessage, setAgentName, shutdownAgent, shutdownAgent, startAgent, vetoTransitionToNormalModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterBuild, afterInit, afterStart, preBuild, preShutdownpublic Subsystem(String name, AgentInfo.AgentType type)
name - name of the subsystem : cannot be nulltype - Agent type@Command(description="set the level of a Logger", type=QUERY, category=CORE, level=0) public void setLogLevel(String keyLogger, String levelName)
keyLogger - name of LoggerlevelName - the name of a JUL Level or null or "null" to revert to inherited Level@Command(description="get the level of a Logger", type=QUERY, category=CORE, level=0) public Level getLogLevel(String keyLogger)
keyLogger - name of Logger@Command(description="check if the level of a Logger is inherited", type=QUERY, category=CORE, level=0) public boolean isLogLevelInherited(String keyLogger)
keyLogger - name of Logger@Command(description="check if the level of a Logger is inherited", type=QUERY, category=CORE, level=0) public String printLoggersLevel()
@Command(description="sets the the depth of stacktraces in Logger messages", type=QUERY, category=CORE, level=1) public void setStackTraceDepth(int depth)
depth - could be negative if we want all the stackTrace@Command(description="sets the format used by TextFormatter for LogEvent messages ", type=QUERY, category=CORE, level=1) public void setLogFormat(String format)
format - @Command(description="sets the handler (ConsoleHandler, FileHandler, LogBusHandler) log level", type=QUERY, category=CORE, level=0) public void setLogHandlerLevel(String handlerName, String level)
java.util.logging.Level#parse(String) to parse the Level corresponding to the provided String.handlerName - The name of the LogHandler. Valid names are: LogBusHandler, LogBus, ConsoleHandler, Console, FileHandler, Filelevel - A String corresponding to a java.util.logging.Level@Command(description="sets the handler (ConsoleHandler, FileHandler, LogBusHandler) log level", type=QUERY, category=CORE, level=0) public Level getLogHandlerLevel(String handlerName)
handlerName - The name of the LogHandler. Valid names are: LogBusHandler, LogBus, ConsoleHandler, Console, FileHandler, File@Command(description="print the levels for all the log handlers", type=QUERY, category=CORE, level=0) public String printLogHandlersLevel()
public Handler getLogHandler(String handlerName)
handlerName - The name of the LogHandler. Valid names are: LogBusHandler, LogBus, ConsoleHandler, Console, FileHandler, File@Command(description="gets the number of commands which are currently running (except the current one!)", type=QUERY, category=SYSTEM) public int getNumberCommandThreads()
@Command(description="gets the name of commands which are currently running", type=QUERY, category=CORE) public String printRunningCommands()
Copyright © 2023 LSST. All rights reserved.