libvmtools/sysLogger.c File Reference

#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include "vmware.h"
#include "vmtoolsInt.h"
Include dependency graph for sysLogger.c:

Typedefs

typedef struct SysLogData SysLogData

Functions

LogHandlerDataVMSysLoggerConfig (const gchar *defaultDomain, const gchar *domain, const gchar *name, GKeyFile *cfg)

Detailed Description

Logger that writes to syslog(3). Since there's only one "syslog connection" for the whole application, this code does reference counting to allow different domains to be configured with a "syslog" handler, and still be able to call closelog(3) when appropriate.


Function Documentation

LogHandlerData* VMSysLoggerConfig ( const gchar *  defaultDomain,
const gchar *  domain,
const gchar *  name,
GKeyFile *  cfg 
)

Initializes syslog if it hasn't been done yet.

Since syslog is shared, it's not recommended to change the default domain during the lifetime of the application, since that may not reflect on the syslogs (and, when it does, it might be confusing).

Parameters:
[in] defaultDomain Application name, used as the syslog identity.
[in] domain Name of log domain.
[in] name Name of log handler.
[in] cfg Configuration data.
Returns:
Syslog logger data.
Generated by  doxygen 1.6.2-20100208