Is it possible to implement the equivalent of the following (pseudo-)code in Python?
#define DEBUG(topic, msg) LOG_IMPL(Logger.DEBUG, topic, msg)
#define INFO(topic, msg) LOG_IMPL(Logger.INFO, topic, msg)
#define LOG_IMPL(level, topic, msg) if(Logger.level() <= level) { Logger.log(level, topic, msg); }
DEBUG("MyComponent", "What you logging at?")
The benefit here being you don't have to evaluate the string log messages, e.g. joining strings, calling .format(), etc.)
UPDATE:
Lazy logger message string evaluation - this answers my question so I will vote to close this post.