summaryrefslogtreecommitdiff
path: root/src/log.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-18 14:47:14 +0000
commitab678324e3d73e2354cef331624ecef7cfc03203 (patch)
tree29394a5aca6e59f817f7cfa3b9281891a273d259 /src/log.cpp
parent32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff)
downloadmana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.gz
mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.bz2
mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.xz
mana-ab678324e3d73e2354cef331624ecef7cfc03203.zip
Added a toString conversion function.
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/log.cpp b/src/log.cpp
index d2f1e125..d40927c5 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -71,16 +71,16 @@ void Logger::log(const char *log_text, ...)
// Print the log entry
std::stringstream timeStr;
- timeStr << "[";
- timeStr << ((((t / 60) / 60) % 24 < 10) ? "0" : "");
- timeStr << (int)(((t / 60) / 60) % 24);
- timeStr << ":";
- timeStr << (((t / 60) % 60 < 10) ? "0" : "");
- timeStr << (int)((t / 60) % 60);
- timeStr << ":";
- timeStr << ((t % 60 < 10) ? "0" : "");
- timeStr << (int)(t % 60);
- timeStr << "] ";
+ timeStr << "["
+ << ((((t / 60) / 60) % 24 < 10) ? "0" : "")
+ << (int)(((t / 60) / 60) % 24)
+ << ":"
+ << (((t / 60) % 60 < 10) ? "0" : "")
+ << (int)((t / 60) % 60)
+ << ":"
+ << ((t % 60 < 10) ? "0" : "")
+ << (int)(t % 60)
+ << "] ";
mLogFile << timeStr.str() << buf << std::endl;