Improve logging significantly – color is back!#1758
Improve logging significantly – color is back!#1758georglauterbach merged 4 commits intodocker-mailserver:masterfrom georglauterbach:logging
Conversation
wernerfred
left a comment
There was a problem hiding this comment.
LGTM 👍🏻
I personally like the changes you introduced to color up the output and allow setting the supervisor loglevel.
Regarding "to not break backwards compatability" my opinion (apart from this PR/change but in general) is that major releases are justified by breaking changes so if you/we think keeping the default by "warn" from now on then there is no better timing as now as we are close to 8.0.0.
I like this idea. I will adjust this PR to use |
Doesn't work for me. I've set it to Can someone confirm this? |
Do you see at least the |
|
Yes. The |
That leads to this startup warning as expected:
|
|
Good. Then I suspect supervisord needs more than an update? Maybe it needs to be restarted too? |
|
The Problem is, that supervisord does not seem to recognize the change. Additional to |
Is there something like a self-restart command? I investigate too, but I'll do this in a few hours:) |
I am not sure, but I don't think that is possible, as supervisor is our PID1. Killing it will stop the container. |
No, dumb-init is - you created the PR yourself :D But, according to this forum post, |
|
Oh my - I will provide a PR. |
Yes, I know. Take a look at this 😉 |
BTW Thats not 100% true. It's not fully possible to get the old behavior back. INFO messages that would appear before |
I made this point clear from the start:
Only these 5 INFO messages are "lost", and I believe this to be fine. #1778 should take care of the rest. |
|
Sorry for not being more precise. I had read it and it's fine. But I thought that should be mentioned in the README? When someone sets a log level, then the assumption probably is, that no messages are suppressed in that log level. For example you set it to |
We could add this to |

This one is important to me. What happened:
_notifybut justechoCRITmessages during startupHere is why you should like and approve it:
First of all, the log right now is all over the place. See:
Let's break this down. At the moment, there is no color in our logs. With this PR, this is not the case anymore. More importantly, there are two
CRITmessages, which absolutely should not be there:This was due to a sloppy supervisor configuration. This is now fixed. The configuration file has been cleaned up and improved.
Someone introduced a plain
echohere:This is now a
_notify. (Note here that I had to adjust the unit tests to not check against our own logs. We never do that and we can't because of a limitation of ANSI-escape parsing. That is absolutely fine though.)You can see that I changed the supervisor log-level to
warn. Before you light this PR up, let me explain:) Currently, you will see this next to our log:This will now not be printed anymore. Is this a problem? I argue it's not:
This will always work, because it is baked into the Dockerfile:
If it's not, a warning is issued and you will see it. Then for
2021-01-21 00:01:16,394 INFO RPC interface 'supervisor' initializedit's the same line of reasoning. If you#re interested in the PIDs:
2021-01-21 00:01:16,394 INFO supervisord started with pid 8 2021-01-21 00:01:17,398 INFO spawned: 'mailserver' with pid 11run
docker exec mail ps. The last message:has the same line of reasoning as the first two arguments. Now, when
start-mailserver.shis running, the default log-level will be warn if you want (and by default). But now you have the choice. You could set it back toinfo.I'd like to see this merged as fast as possible :D