difference between watchdog.err.log and watchdog.log

8 views
Skip to first unread message

bessarabov

unread,
Aug 26, 2010, 11:12:14 AM8/26/10
to Ubic
When some ubic service dies the ubic-watchdog tries to restart it. The
watchdog writes its actions to the log files watchdog.err.log and
watchdog.log. I'm a bit amazed, but the content of these 2 files is
the same. Is it a correct behaviour? If yes, then why ubic needs 2
files instead of one?

I've tesed it with ubic 1.06 and 1.10.

Матюхин Вячеслав

unread,
Aug 26, 2010, 3:44:00 PM8/26/10
to ubic...@googlegroups.com

Yet, it is strange.
Even stranger, I actually documented it :)

Quoting Ubic::Logger POD:

=item B<ERROR(@data)>
Log some error.
Message will be red if writing to terminal, and will be duplicated into both stdout and stderr otherwise.

This behavoir is an echo of our in-house policy about logging errors to stdout to be able to see them in context.

There is not much sense to follow this policy in ubic, so I think i'll change ERROR to write messages only to stdout (only difference between ERROR and INFO will be in color when printing to terminal).
Simply because only ubic-watchdog and ubic-portmap are using this ERROR function, and ubic-watchdog only prints anything when there is something wrong in other services, not in watchdog itself, and ubic-portmap... well, nobody actually cares about ubic-portmap :)

.. # several hours later
Actually, I just uploaded Ubic=1.11 with these changes.

Иван Бессарабов

unread,
Aug 26, 2010, 11:39:50 PM8/26/10
to ubic...@googlegroups.com
=) Yes, I han't read all the pods, maybe this is because I ask so many
questions.

The policy your are talking about is a smart thing, but, as you said,
when there is only stderr stream it makes no sense.

Thank you for the extremely fast solution =)

2010/8/26 Матюхин Вячеслав <m...@berekuk.ru>:

Reply all
Reply to author
Forward
0 new messages