[CRIU] [PATCH 3/3] log: log engine slight redesign
Cyrill Gorcunov
gorcunov at openvz.org
Wed Feb 29 02:52:19 EST 2012
On Wed, Feb 29, 2012 at 11:43:57AM +0400, Andrew Vagin wrote:
> On Wed, Feb 29, 2012 at 02:24:59AM +0400, Cyrill Gorcunov wrote:
> > As being pointed by Kir there must be a clear
> > distinction between errors and output messages.
> >
> > Errors should always go to stderr descriptor
> > while any other messages should go to stdout
> > descriptor.
> >
> > To achieve this a log engine was redesigned
> > a bit.
> >
> > The messages are filtered by their type
> >
> > LOG_MSG - [stdout] plain messages, they escape any
> > log level filtration
> > LOG_ERROR - [stderr] error messages
> > LOG_WARN - [strerr] warning messages
> > LOG_INFO - [stdout] informative messages
> > LOG_DEBUG - [stdout] debug messages
> LOG_DEBUG should be in stderr, because it's additional information.
I don't think so. stderr ususally stand for something as it named,
for errors, debug -- usually additional information we send (for
example when we restore sockets we print out accepted jobs and
such) for more details on what is going on inside program.
>
> Why do we need to divide all this messages? From my experience
> people do it to parse output.
> >
> > By default the LOG_WARN log level is used, thus LOG_INFO
> > and LOG_DEBUG messages will not appear in output stream.
> It's confuse me. I think LOG_INFO should be by default.
Well, personally I think LOG_INFO is too much. There is really
a bunch of info we print out by default. Sure it's usefull for
us but not for regular user I think.
Still for both questions
- should there be two outputs stderr and stdout
- should LOG_INFO being default option
I would like to gather more opinions. Sure we can do everything
you proposed ;)
Cyrill
More information about the CRIU
mailing list