server 0.0.1
basicserverinfrastructure

src/logger.c

Go to the documentation of this file.
00001 #include <stdarg.h>
00002 
00003 #include "logger.h"
00004 #include "interface/class.h"
00005 #include "interface/logger.h"
00006 
00007 const
00008 char * const
00009 logger_level_str[] = {
00010         "DEBUG",
00011         "INFO",
00012         "NOTICE",
00013         "WARNING",
00014         "ERR",
00015         "CRIT",
00016         "ALERT",
00017         "EMERG"
00018 };
00019 
00020 static
00021 void
00022 ctor(void * _this, va_list * params)
00023 {
00024         Logger this = _this;
00025         this->min_level = va_arg(*params, int);
00026 }
00027 
00028 static void dtor(void * _this) {}
00029 
00030 INIT_IFACE(Class, ctor, dtor, NULL);
00031 CREATE_CLASS(Logger, NULL, IFACE(Class));
00032 
00033 // vim: set ts=4 sw=4:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines