| Summary: | log management missing | ||
|---|---|---|---|
| Product: | Red Hat Storage Console | Reporter: | Martin Kudlej <mkudlej> |
| Component: | core | Assignee: | gowtham <gshanmug> |
| core sub component: | configuration | QA Contact: | Martin Kudlej <mkudlej> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | kdreyer, mbukatov |
| Version: | 2 | Keywords: | TestBlocker |
| Target Milestone: | --- | ||
| Target Release: | 2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rhscon-ceph-0.0.23-1.el7scon.x86_64, rhscon-core-0.0.24-1.el7scon.x86_64, rhscon-ui-0.0.39-1.el7scon.noarch | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-11-19 05:33:32 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: | |
| Bug Depends On: | 1338948 | ||
| Bug Blocks: | |||
|
Description
Martin Kudlej
2016-04-08 13:21:05 UTC
Additional info: we may consider systemd documentation suggestions on logging[1]: > Instead of using the syslog() call to log directly to the system syslog > service, a new-style daemon may choose to simply log to standard error via > fprintf(), which is then forwarded to syslog by the init system. If log levels > are necessary, these can be encoded by prefixing individual log lines with > strings like "<4>" (for log level 4 "WARNING" in the syslog priority scheme), > following a similar style as the Linux kernel's printk() level system. For > details, see sd-daemon(3) and systemd.exec(5). [1] see man 7 daemon or https://www.freedesktop.org/software/systemd/man/daemon.html Right now (rhscon-core-0.0.11-1.el7.x86_64), skyring handles writing into the logfile on his own. See: ~~~ # lsof /var/log/skyring/skyring.log COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME skyring 25185 root 1w REG 253,2 5478163 270876 /var/log/skyring/skyring.log skyring 25185 root 2w REG 253,2 5478163 270876 /var/log/skyring/skyring.log skyring 25185 root 4w REG 253,2 5478163 270876 /var/log/skyring/skyring.log skyring 25185 root 15w REG 253,2 5478163 270876 /var/log/skyring/skyring.log bigfin 25204 root 2w REG 253,2 5478163 270876 /var/log/skyring/skyring.log bigfin 25204 root 4w REG 253,2 5478163 270876 /var/log/skyring/skyring.log ~~~ Unfortunately, logging is not discussed in the systemd packaging policy[2], so I'm not sure what is actually required/enforced for a RHEL 7 service/daemon. [2] https://fedoraproject.org/wiki/Packaging:Systemd We are using go-logging library for logging. I hope this does the job for us. We are planing to integrate with logrotate for log management May I suggest that you simply log to STDOUT/STDERR (instead of files), so that logs to go into systemd-journald ? Then you get log rotation for free. See the rhscon-agent BZ 1335210 for details. Log Rotation is implemented successfully for managing logfiles. tested with ceph-ansible-1.0.5-31.el7scon.noarch ceph-installer-1.0.14-1.el7scon.noarch rhscon-ceph-0.0.34-1.el7scon.x86_64 rhscon-core-0.0.35-1.el7scon.x86_64 rhscon-core-selinux-0.0.35-1.el7scon.noarch rhscon-ui-0.0.49-1.el7scon.noarch and it works |