<p dir="ltr"><br>
Il 02/Gen/2016 13:29, "Aleksey Chudov" <<a href="mailto:aleksey.chudov@gmail.com">aleksey.chudov@gmail.com</a>> ha scritto:<br>
><br>
> Thank you for the answer.<br>
><br>
> So, currently there is at least three copy of agent and broker logs on centos 7.2:<br>
> 1. agent.log and broker.log files in /var/log/ovirt-hosted-engine-ha/ directory<br>
> 2. /var/log/messages file<br>
> 3. journald database<br>
><br>
> Does errors additionally send to syslog according to agent-log.conf and broker-log.conf files in /etc/ovirt-hosted-engine-ha/ directory?<br>
><br>
> It's a bit too much :) Do you plan to fix this duplication?</p>
<p dir="ltr">If it's too much, I'd prefer to skip the dedicated log file one.<br>
Personally I'm quite comfortable with systemd logging.<br></p>
<p dir="ltr">> For example 2. and 3. can be quickly disabled by adding StandardOutput=null option to unit file<br>
><br>
> [Service]<br>
> ...<br>
> StandardOutput=null<br>
><br>
> On Sat, Jan 2, 2016 at 2:01 PM, Simone Tiraboschi <<a href="mailto:stirabos@redhat.com">stirabos@redhat.com</a>> wrote:<br>
>><br>
>><br>
>> Il 31/Dic/2015 16:36, "Aleksey Chudov" <<a href="mailto:aleksey.chudov@gmail.com">aleksey.chudov@gmail.com</a>> ha scritto:<br>
>> ><br>
>> > Hi,<br>
>> ><br>
>> > After upgrade from 3.6.0 to 3.6.1 agent and broker duplicate their logs to syslog. So, the same messages logged twice to files in /var/log/ovirt-hosted-engine-ha/ directory and to /var/log/messages file.<br>
>> ><br>
>> > Agent and broker configuration files remain the same for 3.5, 3.6.0 and 3.6.1 and there is not such logs duplication in 3.5 and 3.6.0.<br>
>> ><br>
>> > Is it a bug or expected behavior?<br>
>><br>
>> I think that it's an expected behavior: for 3.6.1 we had to rewrite the systemd startup script due to a slightly different behavior on centos 7.2.<br>
>> Prior than that the agent was forking as a daemon while now it's running as a systemd service with type=simple so its output goes to systemd logging facilities and so also in /var/log/messages according to your system configuration.<br>
>><br>
>> ><br>
>> > OS is CentOS 7.2<br>
>> ><br>
>> > # rpm -qa 'ovirt*'<br>
>> > ovirt-vmconsole-1.0.0-1.el7.centos.noarch<br>
>> > ovirt-vmconsole-host-1.0.0-1.el7.centos.noarch<br>
>> > ovirt-host-deploy-1.4.1-1.el7.centos.noarch<br>
>> > ovirt-hosted-engine-ha-1.3.3.5-1.el7.centos.noarch<br>
>> > ovirt-engine-sdk-python-3.6.0.3-1.el7.centos.noarch<br>
>> > ovirt-release36-002-2.noarch<br>
>> > ovirt-setup-lib-1.0.0-1.el7.centos.noarch<br>
>> > ovirt-hosted-engine-setup-1.3.1.3-1.el7.centos.noarch<br>
>> ><br>
>> ><br>
>> > # cat /etc/ovirt-hosted-engine-ha/agent-log.conf <br>
>> > [loggers]<br>
>> > keys=root<br>
>> ><br>
>> > [handlers]<br>
>> > keys=syslog,logfile<br>
>> ><br>
>> > [formatters]<br>
>> > keys=long,sysform<br>
>> ><br>
>> > [logger_root]<br>
>> > level=INFO<br>
>> > handlers=syslog,logfile<br>
>> > propagate=0<br>
>> ><br>
>> > [handler_syslog]<br>
>> > level=ERROR<br>
>> > class=handlers.SysLogHandler<br>
>> > formatter=sysform<br>
>> > args=('/dev/log', handlers.SysLogHandler.LOG_USER)<br>
>> ><br>
>> > [handler_logfile]<br>
>> > class=logging.handlers.TimedRotatingFileHandler<br>
>> > args=('/var/log/ovirt-hosted-engine-ha/agent.log', 'd', 1, 7)<br>
>> > level=DEBUG<br>
>> > formatter=long<br>
>> ><br>
>> > [formatter_long]<br>
>> > format=%(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s) %(message)s<br>
>> ><br>
>> > [formatter_sysform]<br>
>> > format=ovirt-ha-agent %(name)s %(levelname)s %(message)s<br>
>> > datefmt=<br>
>> ><br>
>> ><br>
>> > Aleksey<br>
>> ><br>
>> > _______________________________________________<br>
>> > Users mailing list<br>
>> > <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
>> > <a href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a><br>
>> ><br>
><br>
><br>
</p>