diff options
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -20,61 +20,61 @@ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <syslog.h> #include <argp.h> #include <tagr.h> -int log_facility = LOGFACILITY; +int log_facility = LOG_FACILITY; char *log_tag; int log_print_severity; /* FIXME: not used */ void init_syslog (char *progname) { if (!log_tag) log_tag = progname; openlog (log_tag, LOG_PID, log_facility); } int syslog_level[] = { LOG_DEBUG, LOG_INFO, LOG_NOTICE, LOG_WARNING, LOG_ERR, LOG_CRIT, }; char *level_str[] = { - "debug", - "info", - "notice", - "warning", - "error", - "CRITICAL", + N_("debug"), + N_("info"), + N_("notice"), + N_("warning"), + N_("error"), + N_("CRITICAL"), }; void vlogmsg (int level, const char *fmt, va_list ap) { if (grecs_log_to_stderr) { - fprintf (stderr, "%s: %s: ", log_tag, level_str[level]); + fprintf (stderr, "%s: %s: ", log_tag, gettext (level_str[level])); vfprintf (stderr, fmt, ap); fprintf (stderr, "\n"); } else vsyslog (syslog_level[level], fmt, ap); } void logmsg (int level, const char *fmt, ...) { va_list ap; |