diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 13:19:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 13:19:41 +0000 |
commit | 54546ce8b8ca863eb3f4024094cf012500d68683 (patch) | |
tree | e54d257c1441af07ab9d075fadabd84f66bed557 /include | |
parent | 09afa5085614e0224a296abd082fce205003c3fe (diff) |
do_log -> static void InspIRCd::Log() (with vararg and std::string variants)
The #define for this still exists, but maybe should be phased out?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4809 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/helperfuncs.h | 2 | ||||
-rw-r--r-- | include/inspircd.h | 4 | ||||
-rw-r--r-- | include/u_listmode.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/helperfuncs.h b/include/helperfuncs.h index e094b1a0e..e5b563051 100644 --- a/include/helperfuncs.h +++ b/include/helperfuncs.h @@ -43,7 +43,7 @@ */ #define STRINGIFY2(x) #x #define STRINGIFY(x) STRINGIFY2(x) -#define log(l, x, args...) do_log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args) +#define log(l, x, args...) InspIRCd::Log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args) void do_log(int level, const char *text, ...); void readfile(file_cache &F, const char* fname); diff --git a/include/inspircd.h b/include/inspircd.h index 0b2a2830d..91d57f75d 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -43,7 +43,7 @@ */ #define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) ) -#define DELETE(x) { do_log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); if (x) { delete x; x = NULL; } else log(DEBUG,"Attempt to delete NULL pointer!"); } +#define DELETE(x) { InspIRCd::Log(DEBUG,"%s:%d: delete()",__FILE__,__LINE__); if (x) { delete x; x = NULL; } else InspIRCd::Log(DEBUG,"Attempt to delete NULL pointer!"); } template<typename T> inline std::string ConvToStr(const T &in) { @@ -114,6 +114,8 @@ class InspIRCd : public classbase bool UnloadModule(const char* filename); InspIRCd(int argc, char** argv); void DoOneIteration(bool process_module_sockets); + static void Log(int level, const char* text, ...); + static void Log(int level, const std::string &text); int Run(); }; diff --git a/include/u_listmode.h b/include/u_listmode.h index b3958caa2..45b04c158 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -9,6 +9,7 @@ #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "inspircd.h" /* $ModDesc: Provides support for easily creating listmodes, stores the time set, the user, and a parameter. */ |