Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A quick patch for supervisor to add in timestamp for the standard output and standard error log file of the processes.
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
You can’t perform that action at this time.