mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-26 12:41:35 +03:00
Fixed incorrect accumulation of newlines in log.
This commit is contained in:
parent
3dea8f8c5d
commit
9f7e909361
@ -265,6 +265,9 @@ CLog::output(int priority, char* msg) const
|
|||||||
msg[g_maxPriorityLength + 1] = ' ';
|
msg[g_maxPriorityLength + 1] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// find end of message
|
||||||
|
char* end = msg + g_priorityPad + strlen(msg + g_priorityPad);
|
||||||
|
|
||||||
// write to each outputter
|
// write to each outputter
|
||||||
CArchMutexLock lock(m_mutex);
|
CArchMutexLock lock(m_mutex);
|
||||||
for (COutputterList::const_iterator index = m_alwaysOutputters.begin();
|
for (COutputterList::const_iterator index = m_alwaysOutputters.begin();
|
||||||
@ -274,7 +277,7 @@ CLog::output(int priority, char* msg) const
|
|||||||
ILogOutputter* outputter = *index;
|
ILogOutputter* outputter = *index;
|
||||||
|
|
||||||
// put an appropriate newline at the end
|
// put an appropriate newline at the end
|
||||||
strcat(msg + g_priorityPad, outputter->getNewline());
|
strcpy(end, outputter->getNewline());
|
||||||
|
|
||||||
// open the outputter
|
// open the outputter
|
||||||
outputter->open(kApplication);
|
outputter->open(kApplication);
|
||||||
@ -289,7 +292,7 @@ CLog::output(int priority, char* msg) const
|
|||||||
ILogOutputter* outputter = *index;
|
ILogOutputter* outputter = *index;
|
||||||
|
|
||||||
// put an appropriate newline at the end
|
// put an appropriate newline at the end
|
||||||
strcat(msg + g_priorityPad, outputter->getNewline());
|
strcpy(end, outputter->getNewline());
|
||||||
|
|
||||||
// open the outputter
|
// open the outputter
|
||||||
outputter->open(kApplication);
|
outputter->open(kApplication);
|
||||||
|
Loading…
Reference in New Issue
Block a user