00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef LOGGER_H
00045 #define LOGGER_H
00046 #include <iostream>
00047 #include <string>
00048 #include "DHCPConst.h"
00049
00050 #define Log(X) logger :: log##X ()
00051 #define LogEnd logger :: endl
00052
00053 namespace logger {
00054
00055 enum Elogmode {
00056 FULL,
00057 SHORT,
00058 SYSLOG,
00059 EVENTLOG
00060 };
00061
00062 using namespace std;
00063 ostream& logCont();
00064 ostream& logEmerg();
00065 ostream& logAlert();
00066 ostream& logCrit();
00067 ostream& logError();
00068 ostream& logWarning();
00069 ostream& logNotice();
00070 ostream& logInfo();
00071 ostream& logDebug();
00072
00073 void Initialize(char * file);
00074 void Terminate();
00075 void setLogName(string x);
00076 void setLogLevel(int x);
00077 void setLogMode(string x);
00078 void EchoOff();
00079 void EchoOn();
00080
00081 ostream & endl (ostream & strum);
00082
00083 }
00084
00085 std::string StateToString(EState state);
00086 std::string StatusCodeToString(int status);
00087
00088 #endif
00089