Experimental Physics and Industrial Control System
On Montag, 5. Mai 2008, J. Lewis Muir wrote:
> I would be happy to submit a
> patch to make errlog.c only print to stderr. However, I'm not sure of
> the intent of this logging facility. Obviously the name would indicate
> that everything it logs is an error. If this is truly the intent, then
> I think it's reasonable to change it to only print to stderr. However,
> if the name is kind of out of date and it's really meant to be a general
> logging facility, not necessarily just for logging errors, then I'm not
> sure how others would feel if all messages went to stderr. I'd be fine
> with it though.
The name 'errlog' is historical; the errlog facility can and should be used
for any kind of message that should appear on the console (IOC shell) /and/
be logged (if logging is turned on). It is not only for errors, witness the
errlogSevPrintf procedure which takes a severity as argument, the lowest of
which is 'info' i.e. not even a warning, just informational content. (This
procedure is, btw, seriously underused, IMHO.)
As regards the output channel messages should be sent to (in addition to the
log server), this should IMO be configurable; from the ioc shell and also
directly from code. However, as default I'd strongly prefer stderr over
stdout. Note that stderr is traditionally used not only for error messages,
but for all kinds 'meta messages', i.e. information /about the process/ of
computing some result (that itself should go to stdout) or producing the
desired effect. This includes debug messages (if turned on), progress
report, warnings, errors, etc. The intention is that computed output (if
any) doesn't become polluted with such messages and thus can be redirected
to a file or some other process without extra effort to separate it from
such messages.
Cheers
Ben
- References:
- RE: camonitor prints CA errors to stdout rather than stderr Jeff Hill
- Re: camonitor prints CA errors to stdout rather than stderr J. Lewis Muir
- Navigate by Date:
- Prev:
Re: camonitor prints CA errors to stdout rather than stderr J. Lewis Muir
- Next:
RE: Listing channels Jeff Hill
- Index:
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: camonitor prints CA errors to stdout rather than stderr J. Lewis Muir
- Next:
Re: camonitor prints CA errors to stdout rather than stderr J. Lewis Muir
- Index:
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024