diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
| commit | 9a2b45caa81d8fb056802dfe3c25f214e808ffdf (patch) | |
| tree | 1cead4781d2a8546c3ba8b8f936d18bf8e8a6403 /src/lib/log.cc | |
| parent | aa3565457977dabb658f41c71e14151473b91f07 (diff) | |
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/log.cc')
| -rw-r--r-- | src/lib/log.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/log.cc b/src/lib/log.cc index 4de6bd874..5e8277a23 100644 --- a/src/lib/log.cc +++ b/src/lib/log.cc @@ -26,6 +26,7 @@ #include "log.h" #include "cross.h" #include "config.h" +#include "safe_stringstream.h" #include "i18n.h" @@ -63,7 +64,7 @@ Log::log (string message, int type) time (&t); string a = ctime (&t); - stringstream s; + SafeStringStream s; s << a.substr (0, a.length() - 1) << N_(": "); if (type & TYPE_ERROR) { @@ -90,7 +91,7 @@ Log::microsecond_log (string m, int t) struct timeval tv; gettimeofday (&tv, 0); - stringstream s; + SafeStringStream s; s << tv.tv_sec << N_(":") << tv.tv_usec << N_(" ") << m; do_log (s.str ()); } |
