[CRIU] [PATCH 3/3] log: log engine slight redesign

Pavel Emelyanov xemul at parallels.com
Wed Feb 29 06:13:13 EST 2012


On 02/29/2012 02:49 PM, Cyrill Gorcunov wrote:
> On Wed, Feb 29, 2012 at 02:43:51PM +0400, Cyrill Gorcunov wrote:
>> On Wed, Feb 29, 2012 at 02:39:56PM +0400, Pavel Emelyanov wrote:
>>>>
>>>> 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
>>>
>>> These 4 above should go to logfd, no?
>>
>> No, I thought error and warnings should always go to stderr
>> while anything else to stdout. If user specifies output
>> file from command line as say -o "out", then our fd which
>> represent stdout become "out" file.
>>
> 
> Or, maybe, everything which goes to stderr should be
> duplicated in stdout as well?

I'd make it simple -- LOG_MSG goes to stdout, LOG_<everything else> goes
to logfd, which is stderr by default.

Andrey has rich experience with similar things. Andrey, do you agree with
the above?

> 	Cyrill
> 


More information about the CRIU mailing list