Include datetime in httpok and memmon script logs#75
Include datetime in httpok and memmon script logs#75erral wants to merge 4 commits intoSupervisor:mainfrom
Conversation
|
There is a setuptools error on the python 3.2 tests, that seems to be unrelated to superlance... |
|
This addresses #71 |
|
@erral thanks for addressing this! wouldn't be better to test the presence of the time stamp using assertRegexpMatches? |
|
Maybe... anyway the tests are run also for python 2.6 (https://github.com/Supervisor/superlance/blob/master/.travis.yml#L7) and according to the python docs assertRegexpMatches was introduced on python 2.7 |
|
can someone review this and give some feedback? @mnaberez? @tseaver? @erral what do you think on using the server locale? for instance, in one server I see this format on nginx log: if I use the code you implemented it gets printed differently: |
tseaver
left a comment
There was a problem hiding this comment.
Overall, the intent looks good.
- I would be inclined to centralize the repeated "generate a message line with datestamp" bits into methods on the
HTTPOkandMemmonclasses, so that I could test it explicitly (the updated tests just skip over it). - Using a standard ISO format seems much more natural to me for logging than a locale-generated one.
|
yes it could be more natural from the programing point of view, but from the user interface perspective is confusing as I will have to do time zone conversions every time I look at the logs; add to that daylight timezones and you are creating two problems instead of solving one. |
|
I suggest logging timestamps the exact same way supervisord does, whatever that may be (it would be in |
|
here's a typical log from supervisor and seems to be using local time: it would be interesting to add the level also. |
Useful to know when the httpOk or Memmon scripts did something, because currently they only log what the did, not when they did it.