From 92d9e0923cb6a5ada4fa73d16cf75d00be215e86 Mon Sep 17 00:00:00 2001 From: "Dr.Elias" Date: Fri, 26 Nov 2021 18:18:25 +0300 Subject: [PATCH] fix merged logs rotation --- tdutils/td/utils/TsFileLog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tdutils/td/utils/TsFileLog.cpp b/tdutils/td/utils/TsFileLog.cpp index 07d8335e..ce5cccab 100644 --- a/tdutils/td/utils/TsFileLog.cpp +++ b/tdutils/td/utils/TsFileLog.cpp @@ -80,6 +80,9 @@ class TsFileLog : public LogInterface { } Info *get_current_info() { + if (merge_thread_logs_) { + return &logs_[0]; + } return &logs_[get_thread_id()]; } @@ -90,7 +93,7 @@ class TsFileLog : public LogInterface { } string get_path(Info *info) { - if (info->id == 0 || merge_thread_logs_) { + if (info->id == 0) { return path_; } return PSTRING() << path_ << ".thread" << info->id << ".log";