Opened 51 years ago

Last modified 10 years ago

#884 new defect

IZ552: Global command line option -l not working correctly

Reported by: torsten Owned by:
Priority: low Milestone:
Component: hedeby Version: 1.0
Severity: minor Keywords: cli

Description (last modified by admin)

[Imported from gridengine issuezilla]

        Issue #:      552          Platform:     All         Reporter: torsten (torsten)
       Component:     hedeby          OS:        All
     Subcomponent:    cli          Version:      1.0            CC:    None defined
        Status:       NEW          Priority:     P4
      Resolution:                 Issue type:    DEFECT
                               Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
       * Summary:     Global command line option -l not working correctly
   Status whiteboard:

     Issue 552 blocks:
   Votes for issue 552:     Vote for this issue

   Opened: Wed Aug 6 04:49:00 -0700 2008 

   Executing the sdmadm command with the global option -l to set the log level does
   not always set the log level correctly.

   % sdmadm -l ALL sbc

   prints only the bootstrap configuration without any additional logging output
   (even though the -l ALL should basically turn on all possible logging outputs).

   In contrast:

   % sdmadm -l com.sun.grid.grm=ALL sbc

   shows lots of debug output.

   This is a minor issue, the functionality is mainly used for debugging and
   workarounds exist.

   Suggested Fix / Work Around:
   The command should work as advertised in the doc. It should be possible to
   enable/disable logging for any loggers.

   As a workaround it is neccessary to specify a specific log level for the
   com.sun.grid.grm logger in addition to any other logger specifications. So to
   make the example from the description work:

   % sdmadm -l ALL:com.sun.grid.grm=ALL sbc

   The problem is located in AbstractCliCommand.initLogging (line 452). The intent
   of this line is to make sure that the com.sun.grid.grm logger is always set to
   log at least messages of severity INFO. This is neccessary because cli commands
   use warnings and info messages via the logging system that need to be displayed
   to the user.

   The way it is implemented currently, however, resets the level of all loggers
   below com.sun.grid.grm to level INFO if no level for the logger com.sun.grid.grm
   is set via the command line. The condition has to take care of log levels set in
   the hierarchy above com.sun.grid.grm (e.g. com.sun) and has to make sure that at
   least level INFO is set for com.sun.grid.grm (but a finer level is also OK).

   It is questionable what to do when com.sun.grid.grm is explicitly set to
   something less verbose than INFO, like e.g. WARNING. Whatever the decision,
   there should be a test covering the decision as well as a documentation fix that
   explicitly documents the (special case) behaviour with the com.sun.grid.grm logger.

   How to test:
   Write a testsuite test that checks the output of the above example commands (or
   any other command that uses the -l switch) for the correct debug logging output.
   Write additional test cases that cover the special behavior of the
   com.sun.grid.grm logger.

   2 PD
               ------- Additional comments from adoerr Wed Aug 20 07:43:12 -0700 2008 -------
   New target milestone.
               ------- Additional comments from torsten Fri Nov 27 00:31:39 -0700 2009 -------
   fixed milestone

Change History (1)

comment:1 Changed 10 years ago by admin

  • Description modified (diff)
  • Priority set to low
  • Severity set to minor
Note: See TracTickets for help on using tickets.