summaryrefslogtreecommitdiff
path: root/2005
diff options
context:
space:
mode:
authorschodet2005-02-09 14:04:00 +0000
committerschodet2005-02-09 14:04:00 +0000
commit8cfe3413142a349802cc7daf7261a1bfa1cd1f5e (patch)
tree2f0bad29f327e4f78f604968841dfb092c7bdae1 /2005
parent41f4942d3b5b280325a3aca6d78c79c33e84c240 (diff)
Fix: oublie d'affichage du message.
Diffstat (limited to '2005')
-rw-r--r--2005/i/robert/src/log/log.cc20
-rw-r--r--2005/i/robert/src/log/log.hh2
-rw-r--r--2005/i/robert/src/log/log_message.cc1
3 files changed, 12 insertions, 11 deletions
diff --git a/2005/i/robert/src/log/log.cc b/2005/i/robert/src/log/log.cc
index 7f65efa..e0607ef 100644
--- a/2005/i/robert/src/log/log.cc
+++ b/2005/i/robert/src/log/log.cc
@@ -44,27 +44,27 @@ Log::operator() (const char *msg, Level level/*info*/) const
}
/// Traduit le niveau de log.
-void
-Log::toString (Level level, std::string &s)
+std::string
+Log::toString (Level level)
{
switch (level)
{
case none:
- s = "none"; break;
+ return "none";
case fatal:
- s = "fatal"; break;
+ return "fatal";
case error:
- s = "error"; break;
+ return "error";
case warning:
- s = "warning"; break;
+ return "warning";
case info:
- s = "info"; break;
+ return "info";
case debug:
- s = "debug"; break;
+ return "debug";
case verydebug:
- s = "verydebug"; break;
+ return "verydebug";
default:
- s = "logunknown"; break;
+ return "logunknown";
}
}
diff --git a/2005/i/robert/src/log/log.hh b/2005/i/robert/src/log/log.hh
index 026b1f0..055f00e 100644
--- a/2005/i/robert/src/log/log.hh
+++ b/2005/i/robert/src/log/log.hh
@@ -58,7 +58,7 @@ class Log
/// Récupère l'instance.
const char *getInstance (void) const { return instance_; }
/// Traduit le niveau de log.
- static void toString (Level level, std::string &s);
+ static std::string toString (Level level);
/// Traduit le niveau de log.
static Level toLevel (const std::string &level);
/// Traduit le masque de niveau de log.
diff --git a/2005/i/robert/src/log/log_message.cc b/2005/i/robert/src/log/log_message.cc
index 68568c1..4a3af9a 100644
--- a/2005/i/robert/src/log/log_message.cc
+++ b/2005/i/robert/src/log/log_message.cc
@@ -32,6 +32,7 @@ LogMessage::LogMessage (const Log &log, const char *msg, Log::Level level)
std::cout << log.getModule () << ':';
if (log.getInstance ())
std::cout << ' ' << log.getInstance () << ':';
+ std::cout << ' ' << msg;
}
/// Destructeur.