char* port = osrfConfigGetValue( NULL, "/port" );
char* unixpath = osrfConfigGetValue( NULL, "/unixpath" );
char* facility = osrfConfigGetValue( NULL, "/syslog" );
+ char* actlog = osrfConfigGetValue( NULL, "/actlog" );
char* domain = strdup(osrfStringArrayGetString( arr, 0 )); /* just the first for now */
osrfStringArrayFree(arr);
if(!strcmp(log_file, "syslog")) {
osrfLogInit( OSRF_LOG_TYPE_SYSLOG, contextnode, llevel );
osrfLogSetSyslogFacility(osrfLogFacilityToInt(facility));
+ if(actlog) osrfLogSetSyslogActFacility(osrfLogFacilityToInt(actlog));
} else {
osrfLogInit( OSRF_LOG_TYPE_FILE, contextnode, llevel );
__osrfGlobalTransportClient = client;
}
+ free(actlog);
free(facility);
free(log_level);
free(log_file);
if(!facility) return LOG_LOCAL0;
if(strlen(facility) < 6) return LOG_LOCAL0;
switch( facility[5] ) {
- case 0: return LOG_LOCAL0;
- case 1: return LOG_LOCAL1;
- case 2: return LOG_LOCAL2;
- case 3: return LOG_LOCAL3;
- case 4: return LOG_LOCAL4;
- case 5: return LOG_LOCAL5;
- case 6: return LOG_LOCAL6;
- case 7: return LOG_LOCAL7;
+ case '0': return LOG_LOCAL0;
+ case '1': return LOG_LOCAL1;
+ case '2': return LOG_LOCAL2;
+ case '3': return LOG_LOCAL3;
+ case '4': return LOG_LOCAL4;
+ case '5': return LOG_LOCAL5;
+ case '6': return LOG_LOCAL6;
+ case '7': return LOG_LOCAL7;
}
return LOG_LOCAL0;
}