[Devel] Re: [PATCH 00/17] Standardize c/r error reporting

Serge E. Hallyn serue at us.ibm.com
Thu Oct 29 19:12:48 PDT 2009


Quoting Oren Laadan (orenl at librato.com):
> 
> 
> serue at us.ibm.com wrote:
> > From: Serge E. Hallyn <serue at us.ibm.com>
> > 
> > This patchset
> > 	1. defines ckpt_error() 
> > 	2. allows users to pass a logfd into sys_checkpoint and
> > 	   sys_restart
> > 	3. Switches ckpt_write_err() to accepting a single enhanced
> > 	   format string, instead of two separate formats.
> > 	4. Has ckpt_write_err() call ckpt_error() to also log the
> > 	   error in the user-provided logfile and syslog.
> > 
> > Every ckpt_error() message is prefixed by current's global pid,
> > current's virtual pid, number of bytes read/written, and the
> > ctx->errno.
> 
> Hmmm... I thought that we'd have:
> 
> ckpt_error() will be used _only_ when there is an error.
> (will always print ctx->errno, which is assumed to be set)
> 
> ckpt_debug() will be used to report "log-able" debugging info
> (will not print ctx->errno, because there wasn't any error)
> 
> _ckpt_debug() will be used to throw debugging info that isn't
> logged (only goes to dmesg) and will not be compiled unless
> CONFIG_CHECKPOINT_DEBUG is selected. This is useful for those
> debug messages that are a pain to add remove, but that we
> don't want to spit to users' logs.
> 
> Maybe rename ckpt_debug() to ckpt_log() and then _ckpt_debug()
> to ckpt_debug()...
> 
> I think it's confusing for ckpt_error() to be used everywhere.

Agreed, and I almost changed it today but didn't.  However note
that ckpt_error really is just for errors.  So I'll just rename
ckpt_log_error()->ckpt_log_msg() (and same with *_v).

-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list