Logging with Petals ESB

The log configuration of Petals ESB is defined in the conf/loggers.properties file.
It defines the log level of the different elements of Petals ESB, including container modules and Petals components.


Here is a sample loggers.properties file:

# PETALS: PETALS Services Platform
# Copyright (C) 2005  EBM WebSourcing
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
# USA.
#
# Initial developer(s): EBM WebSourcing

# -----------------------------------------------------------------------
# Logger class name
# -----------------------------------------------------------------------
monolog.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory

# -----------------------------------------------------------------------
# PEtALS : Defines all Levels
# -----------------------------------------------------------------------
logger.Petals.level INFO

# petals sub-logger levels. Same as petals-logger level if commented
#logger.Petals.ConfigurationServiceImpl.level DEBUG
#logger.Petals.Communication.NetworkServiceImpl.level DEBUG
#logger.Petals.Communication.TopologyServiceImpl.level DEBUG
#logger.Petals.Communication.JNDIAgentServiceImpl.level DEBUG
#logger.Petals.Communication.JNDIServiceImpl.level DEBUG
#logger.Petals.Communication.JMXServiceImpl.level DEBUG
#logger.Petals.Communication.RMIConnectorImpl.level DEBUG
#logger.Petals.Communication.RemoteCheckerClientImpl.level DEBUG
#logger.Petals.Tools.WebServiceManagerImpl.level DEBUG
#logger.Petals.PetalsAdminServiceImpl.level DEBUG
#logger.Petals.System.PersistenceServiceImpl.level DEBUG
#logger.Petals.System.LoaderManagerServiceImpl.level DEBUG
#logger.Petals.System.SystemStateServiceImpl.level DEBUG
#logger.Petals.System.RepositoryServiceImpl.level DEBUG
#logger.Petals.JBI-Management.AdminServiceImpl.level DEBUG
#logger.Petals.JBI-Management.SystemRecoveryServiceImpl.level DEBUG
#logger.Petals.JBI-Management.InstallationServiceImpl.level DEBUG
#logger.Petals.JBI-Management.DeploymentServiceImpl.level DEBUG
#logger.Petals.JBI-Messaging.RouterMonitorServiceImpl.level DEBUG
#logger.Petals.JBI-Messaging.RouterServiceImpl.level DEBUG
#logger.Petals.JBI-Messaging.FlowControllerModule.level DEBUG
#logger.Petals.JBI-Messaging.FlowFilterModule.level DEBUG
#logger.Petals.JBI-Messaging.PriorityOrdererModule.level DEBUG
#logger.Petals.JBI-Messaging.AddressResolverModule.level DEBUG
#logger.Petals.JBI-Messaging.TransportResolverModule.level DEBUG
#logger.Petals.JBI-Messaging.EndpointRegistryImpl.level DEBUG
#logger.Petals.Container.level DEBUG
#logger.Petals.Container.ContainerServiceImpl.level DEBUG
#logger.Petals.Container.Components.level DEBUG
#logger.Petals.Transporter.LocalTransporter.level DEBUG
#logger.Petals.Transporter.TcpTransporter.level DEBUG
#logger.Petals.Transporter.NioTransportProtocol.NioSelectorAgent.level DEBUG
#logger.Petals.Transporter.NioTransportProtocol.NioServerAgent.level DEBUG
#logger.Petals.Transporter.NioTransportProtocol.NioClientObjectPool.level DEBUG
#logger.Petals.AutoLoaderServiceImpl.level DEBUG

# Log messages up to the DEBUG level on the SQL BC
logger.Petals.Container.Components.petals-bc-sql.level DEBUG


# -----------------------------------------------------------------------
# root logger
# -----------------------------------------------------------------------
logger.root.cleanHandlers true
logger.root.handler.0 rootConsole

handler.rootConsole.type Console
handler.rootConsole.output System.out
handler.rootConsole.pattern [Root]-%l %d %m%n
handler.rootConsole.level ERROR

# -----------------------------------------------------------------------
# Petals : global configuration logger
# -----------------------------------------------------------------------
logger.Petals.cleanHandlers true
logger.Petals.additivity false

#Petals File Handler
handler.petalsFile.type File
handler.petalsFile.output petals%d.log
handler.petalsFile.pattern %l %d [%t]%n    %m%n
handler.petalsFile.appendMode true
handler.petalsFile.maxSize 1000000
handler.petalsFile.level DEBUG

#Petals Console Handler
handler.petalsConsole.type Console
handler.petalsConsole.output System.out
handler.petalsConsole.pattern [%t]-%l %d %m%n
handler.petalsConsole.level DEBUG

# -----------------------------------------------------------------------
# Petals : ConfigurationServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.ConfigurationServiceImpl.level DEBUG
logger.Petals.ConfigurationServiceImpl.handler.0 petalsConsole
logger.Petals.ConfigurationServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : NetworkServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.NetworkServiceImpl.level DEBUG
logger.Petals.Communication.NetworkServiceImpl.handler.0 petalsConsole
logger.Petals.Communication.NetworkServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : TopologyServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.TopologyServiceImpl.level DEBUG
logger.Petals.Communication.TopologyServiceImpl.handler.0 petalsConsole
logger.Petals.Communication.TopologyServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : JNDIAgentServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.JNDIAgentServiceImpl.level DEBUG
logger.Petals.Communication.JNDIAgentServiceImpl.handler.0 petalsConsole
logger.Petals.Communication.JNDIAgentServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : JNDIServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.JNDIServiceImpl.level DEBUG
logger.Petals.Communication.JNDIServiceImpl.handler.0 petalsConsole
logger.Petals.Communication.JNDIServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : JMXServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.JMXServiceImpl.level DEBUG
logger.Petals.Communication.JMXServiceImpl.handler.0 petalsConsole
logger.Petals.Communication.JMXServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : WebServiceManagerImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.WebServiceManagerImpl.level DEBUG
logger.Petals.Tools.WebServiceManagerImpl.handler.0 petalsConsole
logger.Petals.Tools.WebServiceManagerImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : RMIConnectorImpl logger
# -----------------------------------------------------------------------
#logger.Petals.Communication.RMIConnectorImpl.level DEBUG
logger.Petals.Communication.RMIConnectorImpl.handler.0 petalsConsole
logger.Petals.Communication.RMIConnectorImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : PetalsAdminServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.PetalsAdminServiceImpl.level DEBUG
logger.Petals.PetalsAdminServiceImpl.handler.0 petalsConsole
logger.Petals.PetalsAdminServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : PersistenceServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.System.PersistenceServiceImpl.level DEBUG
logger.Petals.System.PersistenceServiceImpl.handler.0 petalsConsole
logger.Petals.System.PersistenceServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : LoaderManagerServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.System.LoaderManagerServiceImpl.level DEBUG
logger.Petals.System.ClassLoaderServiceImpl.handler.0 petalsConsole
logger.Petals.System.ClassLoaderServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : SystemStateServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.System.SystemStateServiceImpl.level DEBUG
logger.Petals.System.SystemStateServiceImpl.handler.0 petalsConsole
logger.Petals.System.SystemStateServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : RepositoryServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.System.RepositoryServiceImpl.level DEBUG
logger.Petals.System.RepositoryServiceImpl.handler.0 petalsConsole
logger.Petals.System.RepositoryServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : AdminServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Management.AdminServiceImpl.level DEBUG
logger.Petals.JBI-Management.AdminServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Management.AdminServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : SystemRecoveryServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Management.SystemRecoveryServiceImpl.level DEBUG
logger.Petals.JBI-Management.SystemRecoveryServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Management.SystemRecoveryServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : InstallationServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Management.InstallationServiceImpl.level DEBUG
logger.Petals.JBI-Management.InstallationServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Management.InstallationServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : DeploymentServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Management.DeploymentServiceImpl.level DEBUG
logger.Petals.JBI-Management.DeploymentServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Management.DeploymentServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : RouterMonitorServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.RouterMonitorServiceImpl.level DEBUG
logger.Petals.JBI-Messaging.RouterMonitorServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Messaging.RouterMonitorServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : RouterServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.RouterServiceImpl.level DEBUG
logger.Petals.JBI-Messaging.RouterServiceImpl.handler.0 petalsConsole
logger.Petals.JBI-Messaging.RouterServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : FlowControllerModule configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.FlowControllerModule.level DEBUG
logger.Petals.JBI-Messaging.FlowControllerModule.handler.0 petalsConsole
logger.Petals.JBI-Messaging.FlowControllerModule.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : FlowFilterModule configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.FlowFilterModule.level DEBUG
logger.Petals.JBI-Messaging.FlowFilterModule.handler.0 petalsConsole
logger.Petals.JBI-Messaging.FlowFilterModule.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : PriorityOrdererModule configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.PriorityOrdererModule.level DEBUG
logger.Petals.JBI-Messaging.PriorityOrdererModule.handler.0 petalsConsole
logger.Petals.JBI-Messaging.PriorityOrdererModule.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : AddressResolverModule configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.AddressResolverModule.level DEBUG
logger.Petals.JBI-Messaging.AddressResolverModule.handler.0 petalsConsole
logger.Petals.JBI-Messaging.AddressResolverModule.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : TransportResolverModule configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.TransportResolverModule.level DEBUG
logger.Petals.JBI-Messaging.TransportResolverModule.handler.0 petalsConsole
logger.Petals.JBI-Messaging.TransportResolverModule.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : EndpointRegistryImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.JBI-Messaging.EndpointRegistryImpl.level DEBUG
logger.Petals.JBI-Messaging.EndpointRegistryImpl.handler.0 petalsConsole
logger.Petals.JBI-Messaging.EndpointRegistryImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : Container configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Container.level DEBUG
logger.Petals.Container.additivity true
logger.Petals.Container.handler.0 petalsConsole
logger.Petals.Container.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : ContainerServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Container.ContainerServiceImpl.level DEBUG
logger.Petals.Container.ContainerServiceImpl.handler.0 petalsConsole
logger.Petals.Container.ContainerServiceImpl.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : JBI components generic logger
# -----------------------------------------------------------------------
#logger.Petals.Container.Components.level DEBUG
logger.Petals.Container.Components.additivity true
logger.Petals.Container.Components.handler.0 petalsConsole
logger.Petals.Container.Components.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : LocalTransporter configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Transporter.LocalTransporter.level DEBUG
logger.Petals.Transporter.LocalTransporter.handler.0 petalsConsole
logger.Petals.Transporter.LocalTransporter.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : TcpTransporter configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Transporter.TcpTransporter.level DEBUG
logger.Petals.Transporter.TcpTransporter.handler.0 petalsConsole
logger.Petals.Transporter.TcpTransporter.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : NioSelectorAgent configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Transporter.NioTransportProtocol.NioSelectorAgent.level DEBUG
logger.Petals.Transporter.NioTransportProtocol.NioSelectorAgent.handler.0 petalsConsole
logger.Petals.Transporter.NioTransportProtocol.NioSelectorAgent.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : NioSelectorAgent configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Transporter.NioTransportProtocol.NioServerAgent.level DEBUG
logger.Petals.Transporter.NioTransportProtocol.NioServerAgent.handler.0 petalsConsole
logger.Petals.Transporter.NioTransportProtocol.NioServerAgent.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : NioClientObjectPool configuration logger
# -----------------------------------------------------------------------
#logger.Petals.Transporter.NioTransportProtocol.NioClientObjectPool.level DEBUG
logger.Petals.Transporter.NioTransportProtocol.NioClientObjectPool.handler.0 petalsConsole
logger.Petals.Transporter.NioTransportProtocol.NioClientObjectPool.handler.1 petalsFile

# -----------------------------------------------------------------------
# Petals : AutoLoaderServiceImpl configuration logger
# -----------------------------------------------------------------------
#logger.Petals.AutoLoaderServiceImpl.level DEBUG
logger.Petals.AutoLoaderServiceImpl.handler.0 petalsConsole
logger.Petals.AutoLoaderServiceImpl.handler.1 petalsFile


For a change in this file to be taken in account by Petals ESB, a restart is required.
If you want to change logging levels without restarting Petals, you can use JMX. As an example, you can test this feature with the JConsole.

The bean to use is named Petals.service.Logger. The operation to use is setLoggerLevel.
There are two operations with this name.

void setLoggerLevel( int logLevel, String loggerName ) throws Exception;
void setLoggerLevel( String logLevel, String loggerName ) throws Exception;


Here is an example to change the logging level for the Petals SQL component.

parameter 1: INFO
parameter 2: Petals.Container.Components.petals-bc-sql


Notice the difference: in the loggers.properties, the logging level is set with

logger.Petals.Container.Components.petals-bc-sql.level INFO


But in the JMX operation, the parameter is

Petals.Container.Components.petals-bc-sql

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.