Skip to content

Commit db75af8

Browse files
committed
logger: use the global logger instance
1 parent dc83774 commit db75af8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/base/DataDistLogger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DataDistLogger {
3434

3535
static thread_local char* sThisThreadName;
3636

37-
spdlog::logger static I() {
37+
static spdlog::logger& I() {
3838
static std::shared_ptr<spdlog::logger> sTheLogger = nullptr;
3939

4040
if (!sTheLogger) {
@@ -46,7 +46,7 @@ class DataDistLogger {
4646
sTheLogger->set_pattern("[%Y-%m-%d %T.%e][%^%L%$] %v");
4747
}
4848

49-
return *(sTheLogger.get());
49+
return *sTheLogger;
5050
}
5151

5252
inline void do_vformat(fmt::string_view format, fmt::format_args args) {

0 commit comments

Comments
 (0)