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:
cxl 2015-05-05 12:53:29 +00:00
parent 67ca235f77
commit a765bdfa06

View file

@ -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;
}
}