Skip to content

Commit

Permalink
Merge pull request #97 from tontechio/develop
Browse files Browse the repository at this point in the history
fix merged logs rotation
  • Loading branch information
tontechio authored Nov 26, 2021
2 parents b39a599 + 73cd23c commit 13b71a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tdutils/td/utils/TsFileLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ class TsFileLog : public LogInterface {
}

Info *get_current_info() {
if (merge_thread_logs_) {
return &logs_[0];
}
return &logs_[get_thread_id()];
}

Expand All @@ -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";
Expand Down

0 comments on commit 13b71a4

Please sign in to comment.