!13 [sync] PR-10: 修改traffic_crashlog命令debug模式和非debug模式下的日志输出形式

From: @openeuler-sync-bot
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2021-11-15 11:35:54 +00:00 committed by Gitee
commit 95ed6ac2ff
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From a1bc9ba4cf0659c9053a4e52befa95e979801e41 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Sat, 13 Nov 2021 14:56:32 +0800
Subject: [PATCH] fix log in debug mode
diff --git a/src/traffic_crashlog/traffic_crashlog.cc b/src/traffic_crashlog/traffic_crashlog.cc
index 936ccef..124c078 100644
--- a/src/traffic_crashlog/traffic_crashlog.cc
+++ b/src/traffic_crashlog/traffic_crashlog.cc
@@ -260,8 +260,10 @@ main(int /* argc ATS_UNUSED */, const char **argv)
fprintf(fp, "\n");
crashlog_write_records(fp, target);
-
- Error("wrote crash log to %s", logname);
+
+ if (!debug_mode) {
+ Note("wrote crash log to %s", logname);
+ }
ats_free(logname);
--
2.27.0

View File

@ -2,7 +2,7 @@
%{!?release: %define release 2}
Name: trafficserver
Version: 9.1.0
Release: 3
Release: 4
Summary: Apache Traffic Server, a reverse, forward and transparent HTTP proxy cache
License: Apache-2.0
URL: https://trafficserver.apache.org/
@ -13,6 +13,7 @@ Patch0002: CVE-2021-37149.patch
Patch0003: CVE-2021-41585.patch
Patch0004: CVE-2021-43082.patch
Patch0005: Fix-status-failure-after-stopping-service.patch
Patch0006: Fix-log-in-debug-mode.patch
BuildRequires: expat-devel hwloc-devel openssl-devel pcre-devel zlib-devel xz-devel
BuildRequires: libcurl-devel ncurses-devel gcc gcc-c++ perl-ExtUtils-MakeMaker
BuildRequires: libcap-devel cmake libunwind-devel automake
@ -116,6 +117,9 @@ getent passwd ats >/dev/null || useradd -r -u 176 -g ats -d / -s /sbin/nologin -
%{_datadir}/pkgconfig/trafficserver.pc
%changelog
* Sat Nov 13 2021 caodongxia <caodongxia@huawei.com> - 9.1.0-4
- fix log in debug mode
* Fri Nov 12 2021 lingsheng <lingsheng@huawei.com> - 9.1.0-3
- fix stop service fail and remove SysVinit script