Hi,

After discussing $verbosity values on #oscar-cluster IRC channel with DongInn, 
it turned out that we need to make things clear for developers so oscar output 
is coherent when a specific verbosity level is set.

Indeed, the current situation is chaotic. Some modules are extremely verbose at 
level 5 while other are quite quiet.

This document is a 1st draft in helping developers how to manage oscar messages 
output.

Best regards.

--
   Olivier LAHAYE
   CEA DRT/LIST
This document describes the verbosity levels used in OSCAR and what kind of 
message each level is subject to be displayed.

The aim is to have a concistent ouput among all OSCAR components when a 
verbosity level is set.

The verbosity level is a number ranging from 0 to 10: it defaults to 1.

The following flags have an impact on this level.
--quiet sets verbosity to 0
--verbose sets verbosity to 5
--debug sets verbosity to 10


0: Quiet
  - No messages at all (could be used for running gui from a desktop for 
example)
    In that case, the errors should be displayed in the GUI or in the log file 
if required.

1: Default verbosity
  - Only important messages are displayed
    => concistent error messages like "Missing package foo".
    => failed sanity test foo.apb aborting.

2: Display steps
  - [INFO] entering step x
  - succesffully completed step x

3: Major actions are displayed
    => [INFO] Initializing OSCAR db
    =>        Successfully initialized OSCAR DB.
    => [INFO] Running post_rpm_install

4: Major actions details
    =>        running post_rpm_install(foo) ... ok/fail
    =>        running post_rpm_install(bar) ... ok/fail

5: --verbose flag. (displays mor technical details)
  - displays what is being done like:
    => [INFO] Starting Service foo
    => [INFO] successfully started service foo
    => [INFO] Updating config file bar.conf
    => [INFO] checking sanity status for entering "step_6"
    => [ERROR] running post_rpm_install(bar) failed for the following reson


6: (display even more technical details)
  - [INFO] Backing up config file before modifying it
  - [INFO] Querying available nodes
  - [INFO] Querying available packages

7: Also displays system() calls:
    => About to run "$cmd"
    => return code for $cmd: 

8: Display DB queries and results

9: Display variable, scalars contents.

10: --debug flag
  - Everything is displayed
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to