EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Filtering messages print on the IOC shell console
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Paduan Donadio, Marcio" <marcio at slac.stanford.edu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Thu, 26 Mar 2020 20:25:04 +0000
Hi Márcio,

You can turn off all console messages that come from the error logger with the command ‘eltc 0’ (acronym for "error log to console”) and back on again with ‘eltc 1’. You can’t do anything about printf() output though except file a bug report against any code which calls that after initialization.

My philosophy about error messages is that any messages from device support, drivers or other background thread code should call errlog() (or epicsPrintf()” which a synonym for that) to report runtime errors. That way eltc can be used to silence them and they should still be logged if the IOC is connected to a log-server. The only place IOC code should be using printf() or fprintf(stderr, …) is when reporting errors from initialization commands that were run in a startup script or from the command-line (those should not use errlog() because the output gets out of sync since it has to pass through the logging system before being printed).

HTH,

- Andrew


On Mar 26, 2020, at 2:57 PM, Paduan Donadio, Marcio via Tech-talk <tech-talk at aps.anl.gov> wrote:

We have some modules at SLAC that print tons of messages on the console when something gets wrong. When implemented through Asyn or Stream Device there are ways to reduce or cut off the messages, but some modules implement everything with printf or errLogPrintf.
 
It is a long shot, but do you think that there is a way to modify the IOC shell layer to verify a message before it is printed, even when printf is used?
 
Or, did anyone have a better idea other than to modify every module, changing printf and errLogPrintf to something else?
 
Thank you,
 
Márcio Paduan Donadio – Control Systems Engineer
SLAC – Stanford Linear Accelerator Center

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
Re: Filtering messages print on the IOC shell console Ben Franksen via Tech-talk
Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
References:
Filtering messages print on the IOC shell console Paduan Donadio, Marcio via Tech-talk

Navigate by Date:
Prev: Re: Filtering messages print on the IOC shell console Ben Franksen via Tech-talk
Next: Re: Filtering messages print on the IOC shell console Ben Franksen 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Filtering messages print on the IOC shell console Ben Franksen via Tech-talk
Next: Re: Filtering messages print on the IOC shell console Ben Franksen 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  <20202021  2022  2023  2024 
ANJ, 26 Mar 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·