#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include "vmware.h"
#include "vmtoolsInt.h"
Functions | |
LogHandlerData * | VMSysLoggerConfig (const gchar *defaultDomain, const gchar *domain, const gchar *name, GKeyFile *cfg) |
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.
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).
[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. |