summaryrefslogtreecommitdiff
path: root/library/error_log.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:46 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:46 +0200
commitb338e29fd3eaf700f8c8360aa0310048ba941d54 (patch)
tree122f8ef3790d12cd10275ef7453a9e8053322d78 /library/error_log.cpp
parent3.18 (diff)
downloadFreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.gz
FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.bz2
FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.zip
3.19
Diffstat (limited to 'library/error_log.cpp')
-rw-r--r--library/error_log.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/library/error_log.cpp b/library/error_log.cpp
index a78b1c9a..eef8572a 100644
--- a/library/error_log.cpp
+++ b/library/error_log.cpp
@@ -73,14 +73,19 @@ wxString ErrorLogging::formatMessage(const Entry& msg)
break;
}
- const wxString prefix = wxString(wxT("[")) + wxDateTime(msg.time).FormatTime() + wxT("] ") + typeName + wxT(": ");
+ const wxString prefix = wxString(L"[") + wxDateTime(msg.time).FormatTime() + L"] " + typeName + L": ";
wxString formattedText = prefix;
- for (wxString::const_iterator i = msg.message.begin(); i != msg.message.end(); ++i)
+ for (auto i = msg.message.begin(); i != msg.message.end(); ++i)
if (*i == wxChar('\n'))
{
- formattedText += wxString(wxChar('\n')).Pad(prefix.size(), wxChar(' '), true);
- while (*++i == wxChar('\n')) //remove duplicate newlines
+ formattedText += L'\n';
+
+ wxString blanks;
+ blanks.resize(prefix.size(), L' ');
+ formattedText += blanks;
+
+ while (*++i == L'\n') //remove duplicate newlines
;
--i;
}
bgstack15