From a011a040996dd4cdb0152aae2206aebc7f4f7034 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期三, 26 五月 2021 10:49:08 +0800
Subject: [PATCH] refactor, log dir.

---
 src/bh_api.cc |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/bh_api.cc b/src/bh_api.cc
index ca69b6e..8690d5f 100644
--- a/src/bh_api.cc
+++ b/src/bh_api.cc
@@ -36,10 +36,7 @@
 	static std::unique_ptr<TopicNode> ptr;
 	if (!ptr && GlobalInit(BHomeShm())) {
 		auto InitLog = []() {
-			auto id = GetProcExe();
-			char path[200] = {0};
-			sprintf(path, "/opt/vasystem/valog/bhshmq_node_%s.log", id.c_str());
-			ns_log::AddLog(path);
+			ns_log::AddLog(BHLogDir() + "bhshmq_node_" + GetProcExe() + ".log");
 			return true;
 		};
 		static bool init_log = InitLog();

--
Gitblit v1.8.0