Bug 1019243 - engine.log log level can not be set
engine.log log level can not be set
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.3.0
Assigned To: nobody nobody
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 07:11 EDT by David Jaša
Modified: 2013-10-15 14:04 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-15 14:04:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Jaša 2013-10-15 07:11:17 EDT
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 07:16:49 EDT
> 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 08:08:07 EDT
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 09:30:23 EDT
(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 13:19:10 EDT
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 14:04:50 EDT
(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"

Note You need to log in before you can comment on or make changes to this bug.