Clustering a log service
Karaf provides a very rich logging service by leveraging Pax logging.
It's possible to change the log level or display the log messages directly in the Karaf shell console using specific commands: log:set
, log:get
, and log:display
.
Cellar will provide the cellar-log
optional feature. The installation of this feature will add a new log appender. This appender will store the log messages in a cluster map node/message.
Thanks to this cluster map, from any node we will be able to see log messages on other nodes by issuing the following command:
karaf@root> cluster:log-display nodeA … nodeA … nodeB … nodeA …
For a specific node, run the following command:
karaf@root> cluster:log-display nodeA nodeA … nodeA …
The purpose is to provide a cluster form of the log:*
commands.
For instance, it is possible to change the log levels of all nodes in the cluster with the following command:
karaf@root> cluster:log-set DEBUG
For a specific node, run the following command:
karaf...