summaryrefslogtreecommitdiff
path: root/includes/Printer.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-10-10 20:31:41 -0700
committerPixel <pixel@nobis-crew.org>2011-10-10 20:31:41 -0700
commit8ae349b49e16064e4d84b6cfd256e3ca7fb0cd60 (patch)
tree8b01b3ab2097d838771d43c79b92920661ffd37c /includes/Printer.h
parent965148b43b5b859934b7af2e8447ba1026a43a19 (diff)
Adding the 'stats' call to Input.
Also fixing a bug with the Printer - va_args are vicious.
Diffstat (limited to 'includes/Printer.h')
-rw-r--r--includes/Printer.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/Printer.h b/includes/Printer.h
index 20b3b6c..d8ba9cf 100644
--- a/includes/Printer.h
+++ b/includes/Printer.h
@@ -31,12 +31,12 @@ class Printer {
void setLocal();
static Printer * getPrinter();
- static void log(uint32_t level, const String & fmt, ...) { va_list ap; va_start(ap, fmt); log(level, fmt.to_charp(), ap); va_end(ap); }
- static void log(uint32_t level, const char * fmt, ...) { va_list ap; va_start(ap, fmt); log(level, fmt, ap); va_end(ap); }
- static void log(uint32_t level, const char * fmt, va_list ap) { getPrinter()->_log(level, fmt, ap); }
- static void print(const String & fmt, ...) { va_list ap; va_start(ap, fmt); print(fmt.to_charp(), ap); va_end(ap); }
- static void print(const char * fmt, ...) { va_list ap; va_start(ap, fmt); print(fmt, ap); va_end(ap); }
- static void print(const char * fmt, va_list ap) { getPrinter()->_print(fmt, ap); }
+ static void log(uint32_t level, const String & fmt, ...) { va_list ap; va_start(ap, fmt); vlog(level, fmt.to_charp(), ap); va_end(ap); }
+ static void log(uint32_t level, const char * fmt, ...) { va_list ap; va_start(ap, fmt); vlog(level, fmt, ap); va_end(ap); }
+ static void vlog(uint32_t level, const char * fmt, va_list ap) { getPrinter()->_log(level, fmt, ap); }
+ static void print(const String & fmt, ...) { va_list ap; va_start(ap, fmt); vprint(fmt.to_charp(), ap); va_end(ap); }
+ static void print(const char * fmt, ...) { va_list ap; va_start(ap, fmt); vprint(fmt, ap); va_end(ap); }
+ static void vprint(const char * fmt, va_list ap) { getPrinter()->_print(fmt, ap); }
static void enable(uint32_t levels = M_ALL) { getPrinter()->m_verbosity |= levels; }
static void disable(uint32_t levels = M_ALL) { getPrinter()->m_verbosity &= ~levels; }