Skip to content

Instantly share code, notes, and snippets.

@the-c0d3r
Created October 13, 2018 11:47
Show Gist options
  • Save the-c0d3r/a3913f97c207d86505a9e9dae32cb7d3 to your computer and use it in GitHub Desktop.
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.
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