content of e.g. logging.h
#include <QDebug> #define LOG(Verbosity) q##Verbosity().noquote().nospace()
then use it like:
#include "logging.h" QString abc = "bla"; LOG(Info) << abc; LOG(Debug) << abc;
cheers Thilo