From d6c602d8e897964223e6900baac67615b6679d81 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 3 Sep 2024 12:45:46 -0500 Subject: [PATCH] Include file name in log format (#144) Signed-off-by: Addisu Z. Taddese --- log/src/Logger.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/log/src/Logger.cc b/log/src/Logger.cc index 0eccc61..e0d1824 100644 --- a/log/src/Logger.cc +++ b/log/src/Logger.cc @@ -28,7 +28,8 @@ namespace gz::utils::log namespace { /// \brief Default log format /// Example output - constexpr std::string_view kDefaultLogFormat{"%^(%Y-%m-%d %T.%e) [%l] %v%$"}; +constexpr std::string_view kDefaultLogFormat{ + "%^(%Y-%m-%d %T.%e) [%l] [%s:%#] %v%$"}; } /// \brief Private data for the Logger class. class Logger::Implementation