{"action":"created","issue":{"url":"https://api.github.com/repos/Supervisor/supervisor/issues/713","labels_url":"https://api.github.com/repos/Supervisor/supervisor/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/Supervisor/supervisor/issues/713/comments","events_url":"https://api.github.com/repos/Supervisor/supervisor/issues/713/events","html_url":"https://github.com/Supervisor/supervisor/issues/713","id":129281633,"number":713,"title":"question about timestamping","user":{"login":"r2evans","id":5815808,"avatar_url":"https://avatars.githubusercontent.com/u/5815808?v=3","gravatar_id":"","url":"https://api.github.com/users/r2evans","html_url":"https://github.com/r2evans","followers_url":"https://api.github.com/users/r2evans/followers","following_url":"https://api.github.com/users/r2evans/following{/other_user}","gists_url":"https://api.github.com/users/r2evans/gists{/gist_id}","starred_url":"https://api.github.com/users/r2evans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r2evans/subscriptions","organizations_url":"https://api.github.com/users/r2evans/orgs","repos_url":"https://api.github.com/users/r2evans/repos","events_url":"https://api.github.com/users/r2evans/events{/privacy}","received_events_url":"https://api.github.com/users/r2evans/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Supervisor/supervisor/labels/logging","name":"logging","color":"bfdadc"},{"url":"https://api.github.com/repos/Supervisor/supervisor/labels/question","name":"question","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T21:53:59Z","updated_at":"2016-01-27T22:09:10Z","closed_at":"2016-01-27T22:09:10Z","body":"I'm relatively new to supervisor, so this isn't as much an issue as it is a question of unintended consequences.\r\n\r\nThe desired behavior is that some logs have a timestamp automatically prepended to each line of output. To implement this for stdout is trivial in a shell script, but doing the same for stderr simultaneously is a little problematic. StackOverflow has [some](http://stackoverflow.com/questions/9112979/pipe-stdout-and-stderr-to-two-different-processes-in-shell-script) [posts](http://stackoverflow.com/questions/17261296/write-to-file-descriptor-3-without-writing-to-disk) discussing bash and simultaneous redirection, but none of them (untouched or with slight adjustments) worked for me, occasionally resulting in abandoned processes.\r\n\r\nOther scripting languages likely have significantly less-complex methodologies for doing this, but it occurred to me that this feature can go into the process management as well as an optional filter for each process. I can (somewhat) see the argument that this could/should be the client program's responsibility. But, then again, if I have python scripts, bash scripts, C programs, etc, I have to potentially reimplement it (differently) in each program. It seems to me that \"implement once, reuse many times\" is applicable here, where it doesn't matter if the client supports it, the `supervisord` will optionally augment.\r\n\r\nI came across [this email](https://www.mail-archive.com/supervisor-users@lists.supervisord.org/msg01163.html) to the Supervisor-users email list just over two years ago, and have seen no replies or related discussion since. There was also [another email](https://www.mail-archive.com/supervisor-users%40lists.supervisord.org/msg00633.html) 5 years ago with a similar intent, but quickly squashed as \"not interested\".\r\n\r\nI applied Dameon's patch, and with the exception of one typo (replace `process.config` with `config`), it appears to be working fine for those commands I've identified with `timestamp=true`. Besides the maintainers' preference on this issue (I'm not discarding it), are there second-order effects that making this change will have on my supervisor's behavior? (I've seen none so far.)\r\n\r\nI'm using supervisor-3.0b2-1 on ubuntu-14.04.3."},"comment":{"url":"https://api.github.com/repos/Supervisor/supervisor/issues/comments/175885597","html_url":"https://github.com/Supervisor/supervisor/issues/713#issuecomment-175885597","issue_url":"https://api.github.com/repos/Supervisor/supervisor/issues/713","id":175885597,"user":{"login":"mnaberez","id":52712,"avatar_url":"https://avatars.githubusercontent.com/u/52712?v=3","gravatar_id":"","url":"https://api.github.com/users/mnaberez","html_url":"https://github.com/mnaberez","followers_url":"https://api.github.com/users/mnaberez/followers","following_url":"https://api.github.com/users/mnaberez/following{/other_user}","gists_url":"https://api.github.com/users/mnaberez/gists{/gist_id}","starred_url":"https://api.github.com/users/mnaberez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnaberez/subscriptions","organizations_url":"https://api.github.com/users/mnaberez/orgs","repos_url":"https://api.github.com/users/mnaberez/repos","events_url":"https://api.github.com/users/mnaberez/events{/privacy}","received_events_url":"https://api.github.com/users/mnaberez/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T22:09:09Z","updated_at":"2016-01-27T22:09:09Z","body":"> I applied Dameon's patch, and with the exception of one typo (replace process.config with config), it appears to be working fine for those commands I've identified with timestamp=true. Besides the maintainers' preference on this issue (I'm not discarding it), are there second-order effects that making this change will have on my supervisor's behavior? (I've seen none so far.)\r\n>\r\n> I'm using supervisor-3.0b2-1 on ubuntu-14.04.3.\r\n\r\nThis is a pretty old version of Supervisor (3.0b2 was released 2013-05-28) and nobody currently involved with the project has used the patch that you have applied.  I don't think we can answer this question, sorry.  You might try asking the patch author or the mailing list."}}