On Sunday 20 November 2005 13:42, Benjamin Franksen wrote:
> I have removed my bogus 'fix' for HP-UX from logClient.c. The file is
> attached. I hope this is the end of (this part of) the story, for
> 3.14.8 at least.
...and here is a (plain text) draft of Section 19.15 for the Deveoper's
Guide.
Cheers,
Ben
19.15 logClient
===============
Together with the program iocLogServer this provides generic support for logging
text messages (from an IOC) to a file (on a host).
A /log client/ runs on the IOC and accepts string messages and forwards them over
a TCP connection to its designated log server (normally running on a host
machine).
A /log server/ accepts connections from multiple clients and writes the messages
it receives into a rotating file. A log server program ('iocLogServer') is also
part of EPICS base.
Configuration of the iocLogServer, as well as the standard iocLogClient that
internally uses this library, are described in Chapter 10.7 "iocLog".
The header file logClient.h exports the following types and routines:
typedef void *logClientId;
An abstract data type, representing a log client.
logClientId logClientCreate (
struct in_addr server_addr, unsigned short server_port);
Create a new log client. Will block the calling task for a maximum of 2
seconds trying to connect to a server with the given ip address and port. If a
connection cannot be established, an error message is printed on the console,
but the log client will keep trying to connect in the background. This is done
by a background task, that will also periodically (every 5 seconds) flush
pending messages out to the server.
void logClientSend (logClientId id, const char *message);
Send teh given message to the given log client. Messages are not immediately
sent to the log server. Instead they are sent whenever the cache overflows, or
logClientFlush() is called.
void logClientFlush (logClientId id);
Immediately send all outstanding messages to the server.
void logClientShow (logClientId id, unsigned level);
Print information about the log clients internal state to stdout.
For backward compatibility with older versions of the logClient library, the
header file also includes iocLog.h, which exports the definitions for the standard
iocLogClient for error logging. See Chapter 10.7.2.
Also for backward compatibility, the following deprecated routines are exported.
logClientId logClientInit (void);
Create a log client that uses the standard ioc log client environment
variables (EPICS_IOC_LOG_INET and EPICS_IOC_LOG_PORT) as input to
logClientCreate and also registers the log client with the errlog task using
errlogAddListener.
void logClientSendMessage (logClientId id, const char *message);
Check the global variable iocLogDisable before calling logClientSend.
- References:
- RE: R3.14.8 Status/logClient patch Jeff Hill
- Re: R3.14.8 Status/logClient patch Benjamin Franksen
- Navigate by Date:
- Prev:
Re: priorities Marty Kraimer
- Next:
Re: priorities Eric Norum
- 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: R3.14.8 Status/logClient patch Benjamin Franksen
- Next:
RE: R3.14.8 Status/logClient patch Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|