27 static const int iocLogSuccess = 0;
28 static const int iocLogError = -1;
36 static int getConfig (
struct in_addr *pserver_addr,
unsigned short *pserver_port)
44 "iocLog: EPICS environment variable \"%s\" undefined\n",
49 if (epics_port<0 || epics_port>USHRT_MAX) {
51 "iocLog: EPICS environment variable \"%s\" out of range\n",
55 *pserver_port = (
unsigned short) epics_port;
60 "iocLog: EPICS environment variable \"%s\" undefined\n",
81 static void logClientSendMessage (
logClientId id,
const char * message )
106 status = getConfig (&addr, &port);
127 return iocLogSuccess;
133 return iocLogSuccess;
137 return iocLogSuccess;
159 return iocLogClientInit ();
char * name
Name of the parameter.
Routines to get and set EPICS environment parameters.
void epicsStdCall epicsStdCall iocLogFlush(void)
void epicsStdCall logClientSend(logClientId id, const char *message)
void epicsStdCall logClientFlush(logClientId id)
logClientId epicsStdCall logClientInit(void)
void errlogAddListener(errlogListener listener, void *pPrivate)
int epicsStdCall iocLogInit(void)
Extended replacement for the Posix exit and atexit routines.
LIBCOM_API const ENV_PARAM EPICS_IOC_LOG_INET
LIBCOM_API long epicsStdCall envGetInetAddrConfigParam(const ENV_PARAM *pParam, struct in_addr *pAddr)
Get value of an inet addr config parameter.
LIBCOM_API long epicsStdCall envGetLongConfigParam(const ENV_PARAM *pParam, long *pLong)
Get value of a long configuration parameter.
void epicsStdCall iocLogShow(unsigned level)
#define epicsAtExit(F, A)
Convenience macro to register a function and context value to be run when the process exits...
int errlogRemoveListeners(errlogListener listener, void *pPrivate)
logClientId epicsStdCall logClientCreate(struct in_addr server_addr, unsigned short server_port)
void epicsStdCall logClientShow(logClientId id, unsigned level)
LIBCOM_API const ENV_PARAM EPICS_IOC_LOG_PORT