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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: replacing the default CA exception handler |
From: | Marty Kraimer <[email protected]> |
To: | Jeff Hill <[email protected]> |
Cc: | EPICS-tech-talk <[email protected]> |
Date: | Fri, 19 Nov 1999 13:33:00 -0600 |
Jeff Hill wrote: > Perhaps I should just have a call in the CA client library - > ca_disable_exeception_aborts() - so that the default exception > handler can be used. > I vote for this. > Changing topics: > Persons developing CA client applications have asked for the > capability to replace the function that gets called when CA prints > a diagnostic message so messages don't go to stderr and they go to > some log file instead. This capability was provided in > the form of ca_replace_printf_handler(). > > Perhaps Marty will get the same request with > errlogPrintf() when it is used more often in standalone applications. > If this functionality is added then I can base the client lib on > errlogPrintf() while remaining backwards compatible with > ca_replace_printf_handler()? If so I could eliminate some > redundant code and reduce interdependency between the > client and server libraries. This sound like a good idea BUT. errlogPrintf is actually a family of routines and currently have completely different implementation of the host and of the ioc. On the host it would be possibly to just provide a call errlogReplaceVprintf(...) This would work fine. BUT is this really needed. Maybe the answer is yes. On the ioc an errlog call transfers a message to another task. This other task already supports errlogAddListener. If no listeners are attached nothing is displayed. Base currently base supplies iocLogClient which calls errlogAddListener. iocLogClient passes the messages to a logServer. Other code can also call errlogAddListener. For example CDEV provides code that calls errlogAddListener and passes the messages to the CDEV error log server. errlog on the iocs also provides a shell callable switch that decides if messages should also be displayed via printf. Thus for the ioc version of errlog I maintain that no additional flexability is required. Marty Kraimer