Petals ESB Container

Signal an error when setting an incorrect logger name with JMX

Details

  • Type: Improvement Request Improvement Request
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.1.1
  • Fix Version/s: None
  • Component/s: Logging
  • Security Level: Public
  • Description:
    Hide

    When you try to change a logging level dynamically with JMX (to avoid a restart operation of Petals), you have to use the Petals.service.Logger MBean.
    The operation to invoke is called setLoggerLevel.

    However, when you set an incorrect logger name, it says everything went fine.
    When you check in Petals, no change has been done.

    Example:

    • Valid logger name: INFO, Petals.Container.Components.petals-bc-sql
    • Invalid logger name: INFO, logger.Petals.Container.Components.petals-bc-sql.level
    • Invalid logger name: INFO, logger.Petals.Container.Components.petals-bc-sql


    It would be convenient if Petals was checking that an effective change has been made before saying everything worked.

    Show
    When you try to change a logging level dynamically with JMX (to avoid a restart operation of Petals), you have to use the Petals.service.Logger MBean. The operation to invoke is called setLoggerLevel. However, when you set an incorrect logger name, it says everything went fine. When you check in Petals, no change has been done. Example:
    • Valid logger name: INFO, Petals.Container.Components.petals-bc-sql
    • Invalid logger name: INFO, logger.Petals.Container.Components.petals-bc-sql.level
    • Invalid logger name: INFO, logger.Petals.Container.Components.petals-bc-sql

    It would be convenient if Petals was checking that an effective change has been made before saying everything worked.
  • Environment:
    Windows 7 x64
    java version "1.6.0_23"
    Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

Activity

Hide
Christophe DENEUX added a comment - Wed, 28 Sep 2011 - 16:12:02 +0200

As the MBean is provided by Monolog, we can't improve it.

With the next version of Petals (4.0.0), this MBean will be removed because Monolog will be replaced by JDK logging. The JDK logging provides a similar MBean but does not check if logger name exists. Check it before using the MBean attribute LoggerNames.
Perhaps can we add a command to the script petals-esb to set a log level and acting with the MBean attribute to check if the logger name exists.

Show
Christophe DENEUX added a comment - Wed, 28 Sep 2011 - 16:12:02 +0200 As the MBean is provided by Monolog, we can't improve it. With the next version of Petals (4.0.0), this MBean will be removed because Monolog will be replaced by JDK logging. The JDK logging provides a similar MBean but does not check if logger name exists. Check it before using the MBean attribute LoggerNames. Perhaps can we add a command to the script petals-esb to set a log level and acting with the MBean attribute to check if the logger name exists.

People

Dates

  • Created:
    Mon, 27 Jun 2011 - 12:53:25 +0200
    Updated:
    Thu, 7 Mar 2013 - 12:20:23 +0100