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: aSub debug output
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Daykin, Evan" <daykin at frib.msu.edu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Mon, 30 Nov 2020 17:35:50 +0000
Hi Evan,

On Nov 30, 2020, at 10:54 AM, Daykin, Evan via Tech-talk <tech-talk at aps.anl.gov> wrote:

What is the correct method of outputting debug information to the IOC shell from an aSub Record? We have tried errlogprintf(), printf(), and std::cout after setting eltc(1) and errLogInit in the IOC shell, but nothing seems to work. Am I missing a step?

Unless your startup script or some other software is redirecting the IOC’s stdout and/or stderr streams elsewhere a regular printf() or fprintf(stderr) should send output to the console without doing anything special.

All recent versions of Base provide a header file epicsStdio.h which redefines the keywords stdin, stdout and stderr and the routines printf(), puts() and putchar() so the iocsh stream redirection works with any code that includes this header; the redirection streams are thread-specific though, each thread has its own set of FILE* pointers and unless some code running in a thread has explicitly called say epicsSetThreadStdout() the output from printf() will still go to the main process stdout stream. If your code doesn’t explicitly include epicsStdio.h this will not affect you (no other EPICS Base headers pull in that file).

It sounds like there may be something else going on in your case, you’ll have to provide more information if you want help. Are you sure your aSub is actually being processed? Have you tried setting TPRO to confirm that?

- Andrew

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


Replies:
RE: aSub debug output Daykin, Evan via Tech-talk
References:
aSub debug output Daykin, Evan via Tech-talk

Navigate by Date:
Prev: aSub debug output Daykin, Evan via Tech-talk
Next: Re: archappl question Shankar, Murali 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: aSub debug output Daykin, Evan via Tech-talk
Next: RE: aSub debug output Daykin, Evan 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, 02 Dec 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·