[CRIU] [PATCH 0/5] log code update
Cyrill Gorcunov
gorcunov at openvz.org
Sat Jan 12 14:21:52 EST 2013
On Sat, Jan 12, 2013 at 10:30:08PM +0400, Andrew Vagin wrote:
> On Sat, Jan 12, 2013 at 05:06:12PM +0400, Cyrill Gorcunov wrote:
> > The \n implicitly added to pr_perror message was bothering me
> > all the time. So to be solid in coding style lets introduce
> > pr_perr macro helper which will work just like pr_err, requiring
> > new line in format message. In time all pr_perr should be moved
> > to use pr_perr instead and finally pr_perror will be thrown out.
>
> I would like to add \n implicitly to pr_err, pr_info, pr_debug...
> For each log functions, which adds something at the start of a line.
>
> Where may we need to use pr_err without \n?
Adding implicit \n means you can't print continuations. Actually with
timestapm concept introduced this ability has been a bit ruined (which I
still have plans to fix one day). But anyway, what we need is to be able
to produce correct continuations like
pr_info("Dumping something... ");
... some code here ...
if (no-err)
pr_cont("OK");
else
goto err
return
err:
pr_err("\nSome error happened\n");
Cyrill
More information about the CRIU
mailing list