mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-30 23:02:39 -06:00
Core: Improved LOG_BEGIN/LOG_END
git-svn-id: svn://ultimatepp.org/upp/trunk@8418 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
67ca235f77
commit
a765bdfa06
1 changed files with 4 additions and 1 deletions
|
|
@ -234,6 +234,7 @@ static LogOut sLog = { LOG_FILE, 10 * 1024 * 1024 };
|
|||
struct ThreadLog {
|
||||
char buffer[512];
|
||||
int len;
|
||||
int line_depth;
|
||||
int depth;
|
||||
|
||||
void Put(int w);
|
||||
|
|
@ -251,9 +252,11 @@ void ThreadLog::Put(int w)
|
|||
else {
|
||||
buffer[len++] = w;
|
||||
if(w == '\n' || len > 500) {
|
||||
sLog.Line(buffer, len, depth);
|
||||
sLog.Line(buffer, len, line_depth);
|
||||
len = 0;
|
||||
}
|
||||
if(w != '\r')
|
||||
line_depth = depth;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue