Skip to content

Commit

Permalink
define Helper::log in header
Browse files Browse the repository at this point in the history
  • Loading branch information
Exortions committed Dec 26, 2024
1 parent 8603674 commit 829db0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion include/lemlog/logger/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ class Helper {
* @endcode
*/
template <typename... Args>
void log(Level level, const std::string& format, Args&&... args);
void log(Level level, const std::string& format, Args&&... args) {
logger::log(level, m_topic, format, args...);
}
private:
const std::string m_topic;
};
Expand Down
5 changes: 0 additions & 5 deletions src/lemlog/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ static void log(Level level, std::string topic, std::string& format, Args&&... a
Helper::Helper(std::string topic)
: m_topic(topic) {}

template <typename... Args>
void Helper::log(Level level, const std::string& format, Args&&... args) {
logger::log(level, m_topic, format, args...);
}

Sink::Sink() { sinks.push_back(this); }

Sink::~Sink() { sinks.remove(this); }
Expand Down

0 comments on commit 829db0f

Please sign in to comment.