From 0606b1bdaf23dc14d2b817eb8183f29305b89212 Mon Sep 17 00:00:00 2001 From: Ryoji Kurosawa Date: Fri, 8 Nov 2024 19:18:27 +0900 Subject: [PATCH] add severe error info. in the server log https://github.com/project-tsurugi/tsurugi-issues/issues/247 --- src/jogasaki/error/error_info_factory.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jogasaki/error/error_info_factory.cpp b/src/jogasaki/error/error_info_factory.cpp index 53bb6427d..a779ea361 100644 --- a/src/jogasaki/error/error_info_factory.cpp +++ b/src/jogasaki/error/error_info_factory.cpp @@ -39,7 +39,12 @@ std::shared_ptr create_error_info_with_stack_impl( ) { auto info = std::make_shared(code, message, filepath, position, stacktrace); info->status(st); - VLOG_LP(log_trace) << "error_info:" << *info; + if(! stacktrace.empty()) { + // currently assuming the error is severe if stacktrace is provided + LOG_LP(ERROR) << "unexpected internal error " << *info; + } else { + VLOG_LP(log_trace) << "error_info:" << *info; + } return info; }