Il 02/Gen/2016 13:29, "Aleksey Chudov" <aleksey.chudov@gmail.com> ha scritto:
>
> Thank you for the answer.
>
> So, currently there is at least three copy of agent and broker logs on centos 7.2:
> 1. agent.log and broker.log files in /var/log/ovirt-hosted-engine-ha/ directory
> 2. /var/log/messages file
> 3. journald database
>
> Does errors additionally send to syslog according to agent-log.conf and broker-log.conf files in /etc/ovirt-hosted-engine-ha/ directory?
>
> It's a bit too much :) Do you plan to fix this duplication?

If it's too much, I'd prefer to skip the dedicated log file one.
Personally I'm quite comfortable with systemd logging.

> For example 2. and 3. can be quickly disabled by adding StandardOutput=null option to unit file
>
> [Service]
> ...
> StandardOutput=null
>
> On Sat, Jan 2, 2016 at 2:01 PM, Simone Tiraboschi <stirabos@redhat.com> wrote:
>>
>>
>> Il 31/Dic/2015 16:36, "Aleksey Chudov" <aleksey.chudov@gmail.com> ha scritto:
>> >
>> > Hi,
>> >
>> > 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.
>> >
>> > 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.
>> >
>> > Is it a bug or expected behavior?
>>
>> 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.
>> 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.
>>
>> >
>> > OS is CentOS 7.2
>> >
>> > # rpm -qa 'ovirt*'
>> > ovirt-vmconsole-1.0.0-1.el7.centos.noarch
>> > ovirt-vmconsole-host-1.0.0-1.el7.centos.noarch
>> > ovirt-host-deploy-1.4.1-1.el7.centos.noarch
>> > ovirt-hosted-engine-ha-1.3.3.5-1.el7.centos.noarch
>> > ovirt-engine-sdk-python-3.6.0.3-1.el7.centos.noarch
>> > ovirt-release36-002-2.noarch
>> > ovirt-setup-lib-1.0.0-1.el7.centos.noarch
>> > ovirt-hosted-engine-setup-1.3.1.3-1.el7.centos.noarch
>> >
>> >
>> > # cat /etc/ovirt-hosted-engine-ha/agent-log.conf
>> > [loggers]
>> > keys=root
>> >
>> > [handlers]
>> > keys=syslog,logfile
>> >
>> > [formatters]
>> > keys=long,sysform
>> >
>> > [logger_root]
>> > level=INFO
>> > handlers=syslog,logfile
>> > propagate=0
>> >
>> > [handler_syslog]
>> > level=ERROR
>> > class=handlers.SysLogHandler
>> > formatter=sysform
>> > args=('/dev/log', handlers.SysLogHandler.LOG_USER)
>> >
>> > [handler_logfile]
>> > class=logging.handlers.TimedRotatingFileHandler
>> > args=('/var/log/ovirt-hosted-engine-ha/agent.log', 'd', 1, 7)
>> > level=DEBUG
>> > formatter=long
>> >
>> > [formatter_long]
>> > format=%(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s) %(message)s
>> >
>> > [formatter_sysform]
>> > format=ovirt-ha-agent %(name)s %(levelname)s %(message)s
>> > datefmt=
>> >
>> >
>> > Aleksey
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users@ovirt.org
>> > http://lists.ovirt.org/mailman/listinfo/users
>> >
>
>