summaryrefslogtreecommitdiff
path: root/i/marvin/src/log/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/log/log.cc')
-rw-r--r--i/marvin/src/log/log.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/i/marvin/src/log/log.cc b/i/marvin/src/log/log.cc
index 1818b99..e1799b0 100644
--- a/i/marvin/src/log/log.cc
+++ b/i/marvin/src/log/log.cc
@@ -25,14 +25,8 @@
#include "log.hh"
/// Constructeur.
-Log::Log (const char *module)
- : module_ (module), instance_ (0)
-{
-}
-
-/// Constructeur.
-Log::Log (const char *module, const char *instance)
- : module_ (module), instance_ (instance)
+Log::Log (const char *module, const char *instance, Level level)
+ : module_ (module), instance_ (instance), level_(level)
{
}
@@ -100,3 +94,16 @@ Log::toLevelMask (Log::Level level)
return static_cast <Level> ((level - 1) | level);
}
+/// Récupère le niveau de log
+Log::Level
+Log::getLevel(void) const
+{
+ return level_;
+}
+
+/// Set le niveau de log
+void
+Log::setLevel(Level level)
+{
+ level_ = level;
+}