summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-01-02 13:54:34 -0800
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-01-02 13:54:34 -0800
commit2cb567edc01a251bd6e3216113313b0c94bced95 (patch)
treecd795fbf99bab32b19ba986c995c4e7c350090e6 /includes
parentf43da413f0fe1ef4686fcbfa05a97af9a211d217 (diff)
Adding the ability for Printer to override globals.
Diffstat (limited to 'includes')
-rw-r--r--includes/Printer.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/Printer.h b/includes/Printer.h
index 2717a84..f1897d3 100644
--- a/includes/Printer.h
+++ b/includes/Printer.h
@@ -44,10 +44,6 @@ enum {
};
class Printer {
- protected:
- virtual void _print(const char * fmt, va_list ap);
-
- private:
void _print(const char * fmt, ...);
void _log(uint32_t level, const char * fmt, va_list ap);
@@ -56,6 +52,7 @@ class Printer {
Printer();
void setLocal();
+ void setGlobal();
static Printer * getPrinter();
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); }
@@ -76,6 +73,8 @@ class Printer {
static void setDetailled(bool enable) { getPrinter()->m_detailledLogs = enable; }
+ virtual void _print(const char * fmt, va_list ap);
+
private:
uint32_t m_verbosity = M_STATUS | M_WARNING | M_ERROR | M_ENGINE_DEBUG;
bool m_detailledLogs = false;