internal upstart logs

Asked by Ivan Gromov on 2009-03-18

Hello,
I use Upstart 0.3.8
I would like to know where Upstart will write his internal logs (if they exists), if something has happened with Upstart or with script(in event.d)

For instance, in one of the component scripts, I have

 pre-start script
  <...>
  mv foo bar
  <...>
 end script

The mv fails, it is untested, so pre-start fails. Is there any log that I could look to help me find the exact command that failed (the mv)?

Any help is much appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Scott James Remnant (Canonical)
Solved:
2009-03-31
Last query:
2009-03-31
Last reply:
2009-03-30

On Wed, 2009-03-18 at 15:52 +0000, Ivan wrote:

> I use Upstart 0.3.8
> I would like to know where Upstart will write his internal logs (if
> they exists), if something has happened with Upstart or with script(in
> event.d)
>
> For instance, in one of the component scripts, I have
>
> pre-start script
> <...>
> mv foo bar
> <...>
> end script
>
> The mv fails, it is untested, so pre-start fails. Is there any log
> that I could look to help me find the exact command that failed (the
> mv)?
>
Output from shell scripts and other processes Upstart runs is not
currently logged

Scott
--
Scott James Remnant
<email address hidden>

Ivan Gromov (gromivan) said : #2

Thanks Scott James Remnant, that solved my question.

mjs (mjs-beebo) said : #3

Note that you may be able to log process startup messages with e.g.

exec /usr/local/bin/something >> /tmp/upstart.log 2>&1

This will write the output of /usr/local/bin/something to /tmp/upstart.log.

is it (1) possible, and (2) permitted to use /use/bin/logger within upstart scripts
to accomplish standard logging functions without a lot of echo-redirect-capture
mucking about?

Is there some way to ask upstart to make all of its machinations visible to some log
in much the ways that one might want to watch a suite of make-files run?

On Thu, 2009-10-08 at 23:00 +0000, SaintDanBert wrote:

> is it (1) possible, and (2) permitted to use /use/bin/logger within upstart scripts
> to accomplish standard logging functions without a lot of echo-redirect-capture
> mucking about?
>
> Is there some way to ask upstart to make all of its machinations visible to some log
> in much the ways that one might want to watch a suite of make-files run?
>
It's possible, but it's not the expected way to do things with 1.0 -
Upstart will have its own logging system

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?