fprintf(stderr, "%s%s\n", prefix, message);
}
-struct backend backend[] = {
+static const struct backend _backend[] = {
{ DAEMON_LOG_OUTLET_SYSLOG, _log_syslog },
{ DAEMON_LOG_OUTLET_STDERR, _log_stderr },
{ 0, 0 }
void daemon_log(log_state *s, int type, const char *message) {
int i = 0;
- while ( backend[i].id ) {
- if ((int)(s->log_config[type] & backend[i].id) == backend[i].id )
- backend[i].log( s, &s->backend_state[i], type, message );
+ while ( _backend[i].id ) {
+ if ((int)(s->log_config[type] & _backend[i].id) == _backend[i].id )
+ _backend[i].log( s, &s->backend_state[i], type, message );
++ i;
}
}
static int _type_interesting(log_state *s, int type) {
int i = 0;
- while ( backend[i].id ) {
- if ((int)(s->log_config[type] & backend[i].id) == backend[i].id )
+ while ( _backend[i].id ) {
+ if ((int)(s->log_config[type] & _backend[i].id) == _backend[i].id )
return 1;
++ i;
}