Experimental Physics and Industrial Control System
|
Hello Patrick,
the caPutLog facility uses a plug-in interface in the access security
library, installing a hook that writes to the log.
You need to download and compile the caPutLog facility. This code will
call logClientSend - maybe not directly.
This code will also have an initialization routine, which has to be
called to make it register its log-sending routine into the access
security layer. This initialization will be called automatically
(through the registrar facility) on IOCs, a host application like the
Gateway will have to call it manually when it starts up.
Your application (Gateway) is being linked against the access security
layer library. The source code of that library contains the
asTrapWriteRegisterListener routine that the caPutLog facility calls to
install its log-sending routine.
So...
After downloading and compiling the caPutLog module, you will have to
add the generated caPutLog library to the list of libraries that the
Gateway is linked against. (In the Gateway's Makefile.)
You will also have to add the call to caPutLog's init routine to the
Gateway code, in a place where it gets called early enough.
Last, you must configure the Gateway's access control configuration to
actually run the trap-write hook for the channels you want to monitor
access for.
Hope this made things more clear...
Ralph
On 15-Oct-2010 04:45, [email protected] wrote:
Hi,
I'm sorry, I'm not quite sure I understand. I did a grep for
asTrapWriteRegisterListener and logClientSend in the gateway source code
and did not get any results. Is there code in the gateway source somewhere
that does the logging to the file that is specified on the command line?
Thank you,
Patrick
On 12-Oct-2010 13:51, Ben Franksen wrote:
On Dienstag, 12. Oktober 2010, Andrew Johnson wrote:
On Friday 08 October 2010 21:10:26 [email protected] wrote:
I was wondering where the writes to the put log are done in the
gateway source code? I would like to try to modify the source to
allow multiple gateways to write this information to a central
database, but I'm having a bit of a hard time finding the calls in
the code.
I believe this is done through an Access Security hook, so the
gateway calls an asLib routine to check rights and that calls back
into the hook routine. If you look at the documentation for asLib in
the Application Developers' Guide you should find something about
that, but if not ask again and I'll go hunting.
Right, at least that is how it is done on the IOC. You can even
configure put logging in the access security configuration file; IIRC
the gateway has such a file, too.
Note that --again, this is how it works on the IOC-- neither access
security, nor any other part of the IOC knows anything about caPutLog.
Instead, the initialization routine of the caPutLog facility registers
a callback with access security (calling asTrapWriteRegisterListener),
which in turn does the actual logging via calls to logClientSend (see
src/libCom/logClient in base).
Correct.
As the Gateway uses the same access security library as the IOC, to use
caPutLog you would have to link the Gateway against the caPutLog code
compiled for your architecture, and probably call caPutLog's
initialization routine manually somewhere from within main() or one of
the main classes to make sure caPutLog registers with access security
early enough.
Once you have it working, please send a patch and/or a description, as
others might want to do the same and could benefit from your work.
That's probably at least worth a readme or a page on the wiki.
Good luck!
Ralph
- References:
- gateway putlog pthomas
- Re: gateway putlog Andrew Johnson
- Re: gateway putlog Ben Franksen
- Re: gateway putlog Ralph Lange
- Re: gateway putlog pthomas
- Navigate by Date:
- Prev:
Re: Problem in registerRecordDeviceDriver Ralph Lange
- Next:
Re: Problem in registerRecordDeviceDriver Andrew Johnson
- 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
- Navigate by Thread:
- Prev:
Re: gateway putlog pthomas
- Next:
Re: gateway putlog Andrew Johnson
- 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
|
ANJ, 15 Oct 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|