diff --git a/common/include/villas/log.hpp b/common/include/villas/log.hpp index a1a4d6e9c..4ab1d4853 100644 --- a/common/include/villas/log.hpp +++ b/common/include/villas/log.hpp @@ -75,6 +75,7 @@ public: void setLevel(const std::string &lvl); Level getLevel() const; + std::string getLevelName() const; }; } // namespace villas diff --git a/common/lib/log.cpp b/common/lib/log.cpp index 288d1e1ee..a284ac028 100644 --- a/common/lib/log.cpp +++ b/common/lib/log.cpp @@ -161,3 +161,8 @@ Log::Level Log::getLevel() const { return level; } + +std::string Log::getLevelName() const +{ + return std::string(spdlog::level::to_c_str(level)); +}