How to make a persistant debug output?

Asked by Roland Wolters on 2007-05-05

I have no idea how to tell upstart to write to any log file so that I can check afterwards what went wrong.
I know about the --debug kernel option, but the debug is only on the screen and nowhere else in any logfile.

I asked at the wiki page of upstart, , I also asked at the E-Mail list, but I got no answer whatsoever anywhere.
Is it possible at all to make such a log? If not I will create a wish-bug report.

Question information

English Edit question
upstart Edit question
No assignee Edit question
Solved by:
Scott James Remnant (Canonical)
Last query:
Last reply:

There isn't a generic answer to this.

You can't write the debug output directly since you won't have a writable filesystem when upstart starts, since part of its job is to mount the filesystem.

Also upstart reopens the console on startup, so redirecting the file descriptors won't work either.

The easiest way is to include some kind of syslog utility in the initramfs, so it is started before init, and configure that to write to an available writable filesystem (/dev is usually a favourite)

Roland Wolters (wolters-liste) said : #2

Thanks Scott James Remnant, that solved my question.

Can we agree to the convention to write persistent debug, log-type output to some standard name like /dev/upstart/somefile?
Does this make some sort of sense?

Can we get some sort of scaffolding to accomplish this -- some sort of LOG_EVENT or similar -- along with some helper statements within job files?

    LOG_THIS blah blah