On 03/27, Konrad, Martin wrote:
> My recommendation would be to print all messages to the same stream.
I suppose some other options could be:
1. Disable stdout and stderr buffering on the IOC console.
2. Add an fflush call after any legitimate printf/fprintf in EPICS and
EPICS-related code.
3. Add special console_{printf,fprintf} functions (or whatever they
should be named) that will do the printf/fprintf, and then do an
fflush. Then say that all code that would have used printf/fprintf
should use these instead.
4. A thread-safe option (If the only callers of printf/fprintf are
guaranteed to be running in a single-process/single-threaded context,
then this is unnecessary): Add special console_{printf,fprintf}
functions (or whatever they should be named) that are thread-safe
(i.e., can be called concurrently from two or more processes or
threads) that will acquire a console mutex (or whatever it should
be named), do the printf/fprintf, and then do an fflush. Then say
that all code that would have used printf/fprintf should use these
instead.
5. Come up with another logging mechanism for the legitimate uses of
printf/fprintf that is like the errlog facility and will guarantee
that output will not be garbled, but that should be used instead
of printf/fprintf for the cases where using the errlog facility is
considered inappropriate. Then say that all code that would have
used printf/fprintf should use these instead.
Lewis
- References:
- Filtering messages print on the IOC shell console Paduan Donadio, Marcio via Tech-talk
- Re: Filtering messages print on the IOC shell console Johnson, Andrew N. via Tech-talk
- Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Navigate by Date:
- Prev:
Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
- Next:
RE: Filtering messages print on the IOC shell console Freddie Akeroyd - UKRI STFC via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
- Next:
Newport DL325 Igor Kriznar via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|