X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsysdep_decls.h;h=a83c14816f7e5f5ec3fac172b3246e18c3578990;hb=2e5bfef2c1708874507a51c9469b2c181b5523f4;hp=37ee0769fa1c53b14d501e4b9198fed5765a5c70;hpb=5629373d62f7a65f9bbef3a0b664cfc7ee598482;p=citadel.git diff --git a/citadel/sysdep_decls.h b/citadel/sysdep_decls.h index 37ee0769f..a83c14816 100644 --- a/citadel/sysdep_decls.h +++ b/citadel/sysdep_decls.h @@ -4,11 +4,31 @@ #include "sysdep.h" #include "server.h" +/* Logging levels - correspond to syslog(3) */ +enum LogLevel { + /* When about to exit the server for an unrecoverable error */ + CTDL_EMERG, /* system is unusable */ + /* Manual intervention is required to avoid an abnormal exit */ + CTDL_ALERT, /* action must be taken immediately */ + /* The server can continue to run with degraded functionality */ + CTDL_CRIT, /* critical conditions */ + /* An error occurs but the server continues to run normally */ + CTDL_ERR, /* error conditions */ + /* An abnormal condition was detected; server will continue normally */ + CTDL_WARNING, /* warning conditions */ + /* Normal messages (login/out, activity, etc.) */ + CTDL_NOTICE, /* normal but significant condition */ + /* Unimportant progress messages, etc. */ + CTDL_INFO, /* informational */ + /* Debugging messages */ + CTDL_DEBUG, /* debug-level messages */ +}; + #ifdef __GNUC__ -void lprintf (int loglevel, const char *format, ...) __attribute__((__format__(__printf__,2,3))); +void lprintf (enum LogLevel loglevel, const char *format, ...) __attribute__((__format__(__printf__,2,3))); void cprintf (const char *format, ...) __attribute__((__format__(__printf__,1,2))); #else -void lprintf (int loglevel, const char *format, ...); +void lprintf (enum LogLevel loglevel, const char *format, ...); void cprintf (const char *format, ...); #endif @@ -50,6 +70,5 @@ extern struct worker_node { struct worker_node *next; } *worker_list; - extern int SyslogFacility(char *name); extern int syslog_facility;