Subject: |
Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 |
From: |
Andrew Johnson via Core-talk <[email protected]> |
To: |
mdavidsaver <[email protected]> |
Date: |
Mon, 25 Nov 2019 22:46:10 -0000 |
iocLogPrefix() can only be called once, and if you're using it that's presumably because you want to be able to identify which IOC generated each log message, so you should be running it before any messages will be logged anyway. Thus I see no problem with that new restriction.
However with this change applied any supported IOC that sets iocLogPrefix() would always pass its log messages to syslog; I don't see any way to set a prefix for logging to an external log-server without also enabling errlogToSyslog(). An IOC currently has to run iocLogInit to connect to an external log-server, so maybe errlogToSyslog should become a similar command that must appear in st.cmd (iocBuild is too late anyway, dbLoadRecords calls errlogPrintf() and its output should be logged). It would probably need protection against being run twice, and maybe emit an error message if the prefix isn't set.
I'm not convinced we have the prefix logic right — sorry! Wouldn't the following be more intuitive: If the _PREFIX environment variable is set (and not blank) it should be used automatically without needing to call iocLogPrefix(). The user can set the variable in the st.cmd file, so the command isn't really necessary anyway. There should be one or more commands in the st.cmd file to enable the desired log mechanisms. The enable commands can check any necessary preconditions (such as requiring _PREFIX to be set, and saving its value) and report errors then.
--
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/373098
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.
- References:
- [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 mdavidsaver via Core-talk
- Navigate by Date:
- Prev:
Re: [Merge] ~epics-core/epics-base/+git/Com:libcom-api into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Build failed: epics-base base-libcom-api-364 AppVeyor via Core-talk
- Index:
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: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|