|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAgentLogger
Basic interface for agent's logs.
Method Summary | |
---|---|
void |
addDefaultConsoleHandler()
Adds console handler to every existing LogCategory plus to every new one. |
java.util.logging.Handler |
addDefaultFileHandler(java.io.File file)
Adds console handler to every existing LogCategory plus to every new one. |
void |
addDefaultHandler(java.util.logging.Handler handler)
Adds handler to every existing LogCategory plus to every new one. |
void |
addDefaultNetworkHandler()
Adds network handler to every existing LogCategory plus to every new one. |
java.util.logging.Handler |
addDefaultPublisher(ILogPublisher publisher)
Adds publisher to every existing LogCategory plus to every new one. |
void |
addToAllCategories(java.util.logging.Handler handler)
Adds new handler to all categories. |
void |
addToAllCategories(ILogPublisher logPublisher)
Adds new publisher to all categories. |
IAgentId |
getAgentId()
Returns agent name. |
java.util.Map<java.lang.String,LogCategory> |
getCategories()
Return immutable map of all log categories. |
LogCategory |
getCategory(IComponent component)
Returns LogCategory for specified IComponent . |
LogCategory |
getCategory(java.lang.String name)
Returns LogCategory for specified name. |
java.util.logging.Handler |
getDefaultConsoleHandler()
Returns Handler that provides console publishing of all logs. |
java.util.logging.Handler |
getDefaultNetworkHandler()
Returns Handler that provides publishing of all logs through NetworkLogPublisher . |
java.lang.String |
getNetworkLoggerHost()
Returns a host where NetworkLogManager is listening. |
java.lang.Integer |
getNetworkLoggerPort()
Returns port where NetworkLogManager is listening. |
boolean |
isDefaultConsoleHandler()
Tells whether the logger has default console handler attached. |
boolean |
isDefaultNetworkHandler()
Tells whether the logger has default network handler attached. |
void |
removeDefaultConsoleHandler()
Removes default console handler from every existing LogCategory . |
void |
removeDefaultHandler(java.util.logging.Handler handler)
Removes default handler from all existing LogCategory . |
void |
removeDefaultNetworkHandler()
Removes default network handler from every existing LogCategory . |
void |
removeFromAllCategories(java.util.logging.Handler handler)
Removes a handler from all categories. |
void |
setLevel(java.util.logging.Level newLevel)
Set level for all handlers of all categories. |
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.jmx.IJMXEnabled |
---|
enableJMX |
Method Detail |
---|
IAgentId getAgentId()
java.lang.Integer getNetworkLoggerPort()
NetworkLogManager
is listening.
Returns null if network logging is not enabled.
getNetworkLoggerPort
in interface IJMXAgentLogger
java.lang.String getNetworkLoggerHost()
NetworkLogManager
is listening.
Returns null if network logging is not enabled.
getNetworkLoggerHost
in interface IJMXAgentLogger
LogCategory getCategory(IComponent component)
IComponent
.
component
-
LogCategory getCategory(java.lang.String name)
name
-
java.util.Map<java.lang.String,LogCategory> getCategories()
Does not contain agent logger itself.
void addDefaultConsoleHandler()
LogCategory
plus to every new one.
Shortcut for quick usage.
java.util.logging.Handler getDefaultConsoleHandler()
Handler
that provides console publishing of all logs.
May return null in case that console logging is not enabled on the logger, i.e., you have to call
addDefaultConsoleHandler()
.
void removeDefaultConsoleHandler()
LogCategory
.
boolean isDefaultConsoleHandler()
void addDefaultNetworkHandler()
LogCategory
plus to every new one.
Enables utilization of NetworkLogManager
for publishing all logs of this logger.
addDefaultNetworkHandler
in interface IJMXAgentLogger
java.util.logging.Handler getDefaultNetworkHandler()
Handler
that provides publishing of all logs through NetworkLogPublisher
.
May return null in case that network logging is not enabled on the logger, i.e., you have to call
addDefaultNetworkHandler()
.
void removeDefaultNetworkHandler()
LogCategory
.
Note that this method is automatically called whenever the AbstractAgent is stopped/killed.
removeDefaultNetworkHandler
in interface IJMXAgentLogger
boolean isDefaultNetworkHandler()
It allows you to query whether the agent logger is outputting its logs to the NetworkLogManager
or not.
isDefaultNetworkHandler
in interface IJMXAgentLogger
java.util.logging.Handler addDefaultFileHandler(java.io.File file)
LogCategory
plus to every new one.
Shortcut for quick usage.
java.util.logging.Handler addDefaultPublisher(ILogPublisher publisher)
LogCategory
plus to every new one.
publisher
-
void addDefaultHandler(java.util.logging.Handler handler)
LogCategory
plus to every new one.
handler
- void removeDefaultHandler(java.util.logging.Handler handler)
LogCategory
.
handler
- void addToAllCategories(ILogPublisher logPublisher)
logPublisher
- void addToAllCategories(java.util.logging.Handler handler)
handler
- void removeFromAllCategories(java.util.logging.Handler handler)
handler
- void setLevel(java.util.logging.Level newLevel)
newLevel
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |