Bug 1019243

Summary: engine.log log level can not be set
Product: Red Hat Enterprise Virtualization Manager Reporter: David Jaša <djasa>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, alonbl, iheim, lpeer, lyarwood, pzhukov, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-15 18:04:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Jaša 2013-10-15 11:11:17 UTC
Description of problem:
the only place where engine log level is mentioned is /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.xml.in:
      <!-- Only the engine messages go here: -->
      <file-handler name="ENGINE" autoflush="true">
        <level name="INFO"/>
        <formatter>
          <pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        <file path="$getstring('ENGINE_LOG')/engine.log"/>
        <append value="true"/>
      </file-handler>
but even when the level is changed to DEBUG, engine.log still shows only INFO and more severe log levels.

Version-Release number of selected component (if applicable):
is18 / rhevm-3.3.0-0.25.beta1.el6ev.noarch

How reproducible:
always

Steps to Reproduce:
1. try to configure rhev-m to log to engine.log with DEBUG priority
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Jaša 2013-10-15 11:16:49 UTC
> but even when the level is changed to DEBUG

... and the engine is restarted

>, engine.log still shows only INFO and more severe log levels.

Comment 2 Alon Bar-Lev 2013-10-15 12:08:07 UTC
You need to change:

      <logger category="org.ovirt" use-parent-handlers="false">
        <level name="INFO"/>

and:

      <logger category="org.ovirt" use-parent-handlers="false">
        <level name="INFO"/>

and maybe:

      <logger category="org.ovirt.engine.core.bll">
        <level name="INFO"/>

Comment 3 Pavel Zhukov 2013-10-15 13:30:23 UTC
(In reply to Alon Bar-Lev from comment #2)
> You need to change:
> 
>       <logger category="org.ovirt" use-parent-handlers="false">
>         <level name="INFO"/>
> 
> and:
> 
>       <logger category="org.ovirt" use-parent-handlers="false">
>         <level name="INFO"/>
> 
> and maybe:
> 
>       <logger category="org.ovirt.engine.core.bll">
>         <level name="INFO"/>

it works for me (IS18)

Comment 4 David Jaša 2013-10-15 17:19:10 UTC
Yeah, but that needs to be in /etc with sane default categories because:
  * files in /usr are considered part of the program
  * the particular file is not a config file for RPM:
[root@rhevm33 ~]# rpm -q -a --configfiles '*rhev*' | grep /etc/ovirt-engine | wc -l
21
[root@rhevm33 ~]# rpm -q -a --configfiles '*rhev*' | grep /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.xml.in | wc -l
0
  * fiddling with configs in the file can easily break logging for whole RHEV-M (I managed to have DEBUG level for all components in server.log with all occurences of level/name set to INFO - producing 5 GB/day)

By "sane default categories" I mean that I'm now trying to hunt for something on vdsm -> backend -> db path and having all the debug output from frontend, api, locking etc. doesnt't exactly help - so it would make sense to have stanzas in config that would allow log level settings per component in addition to global default log level.

Comment 5 Alon Bar-Lev 2013-10-15 18:04:50 UTC
(In reply to David Jaša from comment #4)
> Yeah, but that needs to be in /etc with sane default categories because:
>   * files in /usr are considered part of the program
>   * the particular file is not a config file for RPM:
> [root@rhevm33 ~]# rpm -q -a --configfiles '*rhev*' | grep /etc/ovirt-engine
> | wc -l
> 21
> [root@rhevm33 ~]# rpm -q -a --configfiles '*rhev*' | grep
> /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.xml.in | wc -l
> 0

Unrelated to first claim of non working... see bug#1017042

>   * fiddling with configs in the file can easily break logging for whole
> RHEV-M (I managed to have DEBUG level for all components in server.log with
> all occurences of level/name set to INFO - producing 5 GB/day)

This is debug setting not production.

> By "sane default categories" I mean that I'm now trying to hunt for
> something on vdsm -> backend -> db path and having all the debug output from
> frontend, api, locking etc. doesnt't exactly help - so it would make sense
> to have stanzas in config that would allow log level settings per component
> in addition to global default log level.

This is doable by engineering request, per requested class names.

If you have use cases we can consider adding these into the default service file, this belongs to bug#1017042

Closing this as not a bug as no problem in "engine.log log level can not be set"