Search code examples
loggingupstart

Timestamps in upstart logs


I'm using upstart on Ubuntu to manage services. It writes to /var/log/upstart/<service>.log. Errors in this file don't have timestamps, which makes it difficult to diagnose problems.

Is there a way -- a stanza of some kind in the config file -- to tell upstart to write timestamps with its log output?


Solution

  • There may be a much more elegant way to do what you want, but I've found the following ghetto method to be sufficiently effective :

               echo "`date` : Doing the next thing..."