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.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/i/marvin/src/log/log.cc b/i/marvin/src/log/log.cc
index e1799b0..5b700a7 100644
--- a/i/marvin/src/log/log.cc
+++ b/i/marvin/src/log/log.cc
@@ -24,8 +24,10 @@
// }}}
#include "log.hh"
+std::ostream * Log::ostLog_ = &std::cout;
+
/// Constructeur.
-Log::Log (const char *module, const char *instance, Level level)
+Log::Log (const char *module, Level level, const char *instance)
: module_ (module), instance_ (instance), level_(level)
{
}
@@ -107,3 +109,17 @@ Log::setLevel(Level level)
{
level_ = level;
}
+
+/// Récupère le ostream où sera envoyé les logs
+std::ostream *
+Log::getOstLog(void)
+{
+ return ostLog_;
+}
+
+/// Set le ostream où sera envoyé les logs
+void
+Log::setOstLog(std::ostream * ost)
+{
+ ostLog_ = ost;
+}