Created
October 13, 2018 11:47
-
-
Save the-c0d3r/a3913f97c207d86505a9e9dae32cb7d3 to your computer and use it in GitHub Desktop.
A quick patch for supervisor to add in timestamp for the standard output and standard error log file of the processes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/supervisor/dispatchers.py b/supervisor/dispatchers.py | |
index 5a96199..dc8087a 100644 | |
--- a/supervisor/dispatchers.py | |
+++ b/supervisor/dispatchers.py | |
@@ -134,7 +134,7 @@ class POutputDispatcher(PDispatcher): | |
maxbytes = getattr(config, '%s_logfile_maxbytes' % channel) | |
backups = getattr(config, '%s_logfile_backups' % channel) | |
- fmt = '%(message)s' | |
+ fmt = '%(asctime)s: %(message)s' | |
if logfile == 'syslog': | |
warnings.warn("Specifying 'syslog' for filename is deprecated. " | |
"Use %s_syslog instead." % channel, DeprecationWarning) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment