Request #4945
Make log output configurable for all services
Status: | Pending | Start date: | 12/01/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Pull request: |
Description
Hello,
By default, oned in configured to output its log to a file
(/var/log/one/oned.log
) but we can configure it to either syslog
or std
.
- We should have an option to disable logging date and time
root@one:~# journalctl -u opennebula.service [...] déc. 01 09:57:18 grichka oned[26906]: Thu Dec 1 09:57:18 2016 [Z0][ONE][I]: Checking database version.
- We have some weird combined logs
root@one:~# journalctl -u opennebula.service [...] déc. 01 10:09:42 grichka oned[32533]: Thu Dec 1 10:09:42 2016 [Z0][TrM][I]: Starting Transfer Manager... déc. 01 10:09:42 grichka oned[32533]: Thu Dec 1 10:09:42 2016 [Z0][DiM][Thu Dec 1 10:09:42 2016 [ZI]: Starting Dispatch Manager... déc. 01 10:09:42 grichka oned[32533]: 0][TrM][I]: Transfer Manager started. déc. 01 10:09:42 grichka oned[32533]: Thu Dec 1 10:09:42 2016 Thu Dec 1 10:09:42 2016 [Z[Z0][DiM0][HKM]][I[I]: Starting Hook Manager... déc. 01 10:09:42 grichka oned[32533]: ]: Dispatch Manager started. déc. 01 10:09:42 grichka oned[32533]: Thu Dec 1 10:09:42 2016 [Z0][HKM][IThu Dec 1 10:09:42 2016 [Z]: Hook Manager started. déc. 01 10:09:42 grichka oned[32533]: 0][AuM][I]: Starting Auth Manager... déc. 01 10:09:42 grichka oned[32533]: Thu Dec 1 10:09:42 2016 [Z0][AuM][I]: Authorization Manager started.
- I don't know if drivers integrate with it (
/etc/one/defaultrc
) - I do not find any configuration instruction for other services (Sunstone, OneFlow, OneGate, Econe)
- systemd
.service
files should defineSyslogIdentifier=
in which case journald send the log to syslog with something more meaningful thanruby
, for example# /lib/systemd/system/opennebula-sunstone.service [Unit] Description=OpenNebula Web UI Server After=syslog.target After=network.target After=opennebula.service After=opennebula-novnc.service BindTo=opennebula-novnc.service [Service] Type=simple Group=oneadmin User=oneadmin ExecStart=/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb ExecStartPre=/usr/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula PIDFile=/var/run/one/sunstone.pid SyslogIdentifier=opennebula-sunstone [Install] WantedBy=multi-user.target
Regards.