Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifies logging into stdout, fixes empty unison.log #12

Merged
merged 1 commit into from
Apr 25, 2020
Merged

Unifies logging into stdout, fixes empty unison.log #12

merged 1 commit into from
Apr 25, 2020

Conversation

ostrolucky
Copy link
Contributor

@ostrolucky ostrolucky commented Apr 25, 2020

Currently, logging doesn't work as expected:

ls -ls /tmp/
total 531728
     0 -rw-------    1 root     root             0 Apr 25 02:30 monit-stdout---supervisor-jE8Kdx.log
     0 srwx------    1 root     root             0 Apr 25 02:30 supervisor.sock
    12 -rw-r--r--    1 root     root         10685 Apr 25 12:23 supervisord.log
     4 -rw-r--r--    1 root     root             2 Apr 25 02:30 supervisord.pid
 19628 -rw-r--r--    1 root     root      20097343 Apr 25 12:23 unison-stdout---supervisor-JHhBXk.log
 51204 -rw-r--r--    1 root     root      52428861 Apr 25 03:21 unison-stdout---supervisor-JHhBXk.log.1
 51212 -rw-r--r--    1 root     root      52437692 Apr 25 03:15 unison-stdout---supervisor-JHhBXk.log.10
 51204 -rw-r--r--    1 root     root      52432255 Apr 25 03:20 unison-stdout---supervisor-JHhBXk.log.2
 51204 -rw-r--r--    1 root     root      52430230 Apr 25 03:20 unison-stdout---supervisor-JHhBXk.log.3
 51204 -rw-r--r--    1 root     root      52429104 Apr 25 03:18 unison-stdout---supervisor-JHhBXk.log.4
 51216 -rw-r--r--    1 root     root      52442028 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.5
 51212 -rw-r--r--    1 root     root      52438895 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.6
 51208 -rw-r--r--    1 root     root      52433297 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.7
 51216 -rw-r--r--    1 root     root      52443988 Apr 25 03:16 unison-stdout---supervisor-JHhBXk.log.8
 51204 -rw-r--r--    1 root     root      52430102 Apr 25 03:15 unison-stdout---supervisor-JHhBXk.log.9
     0 -rw-rw-rw-    1 root     root             0 Oct 24  2019 unison.log

As can be seen above, unison.log is empty. This change makes it so all logs are available via docker logs command instead, where it works reliably.

Used https://stackoverflow.com/a/39127732/524965

Currently, logging doesn't work as expected:
```
ls -ls /tmp/
total 531728
     0 -rw-------    1 root     root             0 Apr 25 02:30 monit-stdout---supervisor-jE8Kdx.log
     0 srwx------    1 root     root             0 Apr 25 02:30 supervisor.sock
    12 -rw-r--r--    1 root     root         10685 Apr 25 12:23 supervisord.log
     4 -rw-r--r--    1 root     root             2 Apr 25 02:30 supervisord.pid
 19628 -rw-r--r--    1 root     root      20097343 Apr 25 12:23 unison-stdout---supervisor-JHhBXk.log
 51204 -rw-r--r--    1 root     root      52428861 Apr 25 03:21 unison-stdout---supervisor-JHhBXk.log.1
 51212 -rw-r--r--    1 root     root      52437692 Apr 25 03:15 unison-stdout---supervisor-JHhBXk.log.10
 51204 -rw-r--r--    1 root     root      52432255 Apr 25 03:20 unison-stdout---supervisor-JHhBXk.log.2
 51204 -rw-r--r--    1 root     root      52430230 Apr 25 03:20 unison-stdout---supervisor-JHhBXk.log.3
 51204 -rw-r--r--    1 root     root      52429104 Apr 25 03:18 unison-stdout---supervisor-JHhBXk.log.4
 51216 -rw-r--r--    1 root     root      52442028 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.5
 51212 -rw-r--r--    1 root     root      52438895 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.6
 51208 -rw-r--r--    1 root     root      52433297 Apr 25 03:17 unison-stdout---supervisor-JHhBXk.log.7
 51216 -rw-r--r--    1 root     root      52443988 Apr 25 03:16 unison-stdout---supervisor-JHhBXk.log.8
 51204 -rw-r--r--    1 root     root      52430102 Apr 25 03:15 unison-stdout---supervisor-JHhBXk.log.9
     0 -rw-rw-rw-    1 root     root             0 Oct 24  2019 unison.log
 ```

 As can be seen above, unison.log is empty. This change makes it so all
 logs are available via `docker logs` command instead, where it works
 reliably
@EugenMayer
Copy link
Owner

That sounds very reasonable to me, not sure whey we did not use the docker stdout /stderr pipe yet

@EugenMayer
Copy link
Owner

Thank you for the contribution!

@EugenMayer EugenMayer merged commit 1a85f85 into EugenMayer:master Apr 25, 2020
@EugenMayer EugenMayer mentioned this pull request Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants