From a765bdfa06a6428e7da23cecf574b119ff010360 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 5 May 2015 12:53:29 +0000 Subject: [PATCH] Core: Improved LOG_BEGIN/LOG_END git-svn-id: svn://ultimatepp.org/upp/trunk@8418 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/Log.cpp b/uppsrc/Core/Log.cpp index f9d66aea4..2fea1edf1 100644 --- a/uppsrc/Core/Log.cpp +++ b/uppsrc/Core/Log.cpp @@ -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; } }