All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: master - dev-type: print log_sys_debug
Date: Fri, 04 Jul 2014 22:15:27 +0200	[thread overview]
Message-ID: <53B70B5F.9030309@redhat.com> (raw)
In-Reply-To: <20140704172218.GB27805@agk-dp.fab.redhat.com>

Dne 4.7.2014 19:22, Alasdair G Kergon napsal(a):
> On Fri, Jul 04, 2014 at 10:32:04AM +0000, Zdenek Kabelac wrote:
>> For non-fatal error use log_sys_debug as the tool
>> is not stopping on these errors.
>
> To be clear about the criteria for the different message levels:
>
> If the code exits with an error status code there MUST have been a log_error.
>
> But issuing a log_error does NOT mean the code must stop processing and exit.
>
> Using log_error means "This is something the user needs to be told about".
>
> That might include something that should never occur on a properly-functioning
> system, but which if it does occur is not fatal to the continued processing
> of the command.
>
> Look at it the other way around:
>    Given that the error *has* occurred, what can be deduced about the likely
>    cause and does the user need to be aware of that cause in case they
>    want to investigate it?
>
> However, the cases where a log_error is non-fatal should be quite rare in the
> code.


Then we most likely need something like

log_non_fatal_error() -

since log_error is tracked and checked if there has been error for the
reason the command has exited with error code.

If we would left log_error() as is - then 'error' usage is already marked,
and the 'real' error might not be actually printed (forgotten to be added to 
the code) - thus user could get misleading idea what's been the real reason 
for error.

(Thought in this particular case - it really looked rather like debug,
since nothing bad happens - and user could be just more confused)

Zdenek



  reply	other threads:[~2014-07-04 20:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 10:32 master - dev-type: print log_sys_debug Zdenek Kabelac
2014-07-04 17:22 ` Alasdair G Kergon
2014-07-04 20:15   ` Zdenek Kabelac [this message]
2014-07-04 23:42     ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B70B5F.9030309@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.