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 | 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 |
<== 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:
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.
|