From: slack Date: Sat, 13 Sep 2008 19:03:12 +0000 (+0200) Subject: Logging functions with up to 10 parameters X-Git-Tag: v0.1~5 X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=a03a47e746c661f3bc90677d43e642b28f6e1b4b;p=wenboi.git Logging functions with up to 10 parameters --- diff --git a/Logger.h b/Logger.h index 20a7d9b..28a6063 100644 --- a/Logger.h +++ b/Logger.h @@ -59,6 +59,12 @@ class Logger: public Singleton #define LOGFUNC8(func, tag) template \ void func(T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8) \ { std::stringstream str; str << p1 << p2 << p3 << p4 << p5 << p6 << p7 << p8; log(tag, str.str()); } + #define LOGFUNC9(func, tag) template \ + void func(T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9) \ + { std::stringstream str; str << p1 << p2 << p3 << p4 << p5 << p6 << p7 << p8 << p9; log(tag, str.str()); } + #define LOGFUNC10(func, tag) template \ + void func(T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9, T10 p10) \ + { std::stringstream str; str << p1 << p2 << p3 << p4 << p5 << p6 << p7 << p8 << p9 << p10; log(tag, str.str()); } #define LOGFUNC(func, tag) \ LOGFUNC1(func, tag) \ @@ -68,7 +74,9 @@ class Logger: public Singleton LOGFUNC5(func, tag) \ LOGFUNC6(func, tag) \ LOGFUNC7(func, tag) \ - LOGFUNC8(func, tag) + LOGFUNC8(func, tag) \ + LOGFUNC9(func, tag) \ + LOGFUNC10(func, tag) LOGFUNC(critical, CRITICAL) LOGFUNC(error, ERROR)