upstart logging output enabled

38,870

Solution 1

Ok, I've found one way to get it :

$ sudo initctl log-priority        # gives the actual (default) logging level
$ sudo initctl log-priority --help # gives available logging levels
$ sudo initctl log-priority info # is enough to get :
$ tail -f /var/log/syslog        # - log of upstart events
$ tail -f /var/log/boot.log      # - log of services output

Solution 2

In newer versions, you can find the upstart logs at:

/var/log/upstart

It has a log for each process it tries to start.

Solution 3

initctl log-priority info logs events, but ignores the program output.

If the program output is important to you, I think the complementary solution is to use logger in your init script:

script
    myawesomeprog 2>&1 | logger -t myawesomeprog
end script

Because it's better to use syslog than manually manage /var/log, like http://upstart.ubuntu.com/wiki/Debugging suggests (in 08/2012).

Share:
38,870
samb
Author by

samb

Updated on March 30, 2020

Comments

  • samb
    samb about 4 years

    Except doing explicit logging instructions like suggested in http://upstart.ubuntu.com/wiki/Debugging, is there a way to enable output of what is happening with upstart?

    • What event is raised
    • What service changed its status (started/stopped/dead)
    • What signal were emmited
    • what output a service produced while starting