[CRIU] Re: [PATCH 2/3] show: Always print informative messages
Cyrill Gorcunov
gorcunov at openvz.org
Mon Feb 27 05:20:44 EST 2012
On Mon, Feb 27, 2012 at 02:11:24PM +0400, Pavel Emelyanov wrote:
> O_o
>
> Как-то жутко у нас это все выглядит. Хотя, конечно, лучше, чем было.
> Давай step 2/N.
>
> > #define printk(fmt, ...) printk_level(LOG_WARN,
>
> Rename to smth without k
> Should emit message regardless of the loglevel set
>
printk is just a habbit. Maybe plain print(), or pr_always?
> > #define pr_info(fmt, ...) printk_level(LOG_WARN,
>
> Should emit message with LOG_DEBUG level
Dunno. Actually I would prefer to have 4 log levels
LOG_WARN -- not error and we can continue, but user _must_ point attention on it
LOG_INFO -- simply informative message, this usually not printed until requested
from command line
LOG_DEBUG -- debug messages, never printed until requested from command line
LOG_ERR -- that's error, we can't continue
>
> > #define pr_err(fmt, ...) printk_level(LOG_ERROR,
>
> OK
>
> > #define pr_panic(fmt, ...) printk_level(LOG_ERROR,
>
> Remove, replace all callers with pr_err
OK
>
> > #define pr_warning(fmt, ...) printk_level(LOG_WARN,
>
> OK
>
> > #define pr_debug(fmt, ...) printk_level(LOG_DEBUG,
>
> Remove, replace all callers with pr_info
>
> > #define pr_perror(fmt, ...) pr_err(fmt ": %m\n", ##__VA_ARGS__)
>
> OK
>
> cr-show.c should use (renamed) printk-s everywhere.
I see
Cyrill
More information about the CRIU
mailing list