File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,15 +91,19 @@ class Logger {
9191
9292 template <typename ... Args>
9393 static void err (const char *fmt, const Args &... args) {
94+ const char *prefix = " Error: " ;
95+ const std::string prefixed_fmt = std::string (prefix) + std::string (fmt);
9496 if /* constexpr */ (lief_logging_support) {
95- Logger::instance ().sink_ ->error (fmt , args...);
97+ Logger::instance ().sink_ ->error (prefixed_fmt. c_str () , args...);
9698 }
9799 }
98100
99101 template <typename ... Args>
100102 static void warn (const char *fmt, const Args &... args) {
103+ const char *prefix = " Warning: " ;
104+ const std::string prefixed_fmt = std::string (prefix) + std::string (fmt);
101105 if /* constexpr */ (lief_logging_support) {
102- Logger::instance ().sink_ ->warn (fmt , args...);
106+ Logger::instance ().sink_ ->warn (prefixed_fmt , args...);
103107 }
104108 }
105109
You can’t perform that action at this time.
0 commit comments