#include "Log.h" #include #include Log::Log(QObject *parent) : QObject(parent) { QString configPath = QCoreApplication::applicationDirPath() + "/log4j.properties"; Log4Qt::PropertyConfigurator::configure(configPath); } Log::~Log() { } Log* Log::instance() { static Log log; return &log; } void Log::debug(const QString &log) { logger()->debug(log); } void Log::info(const QString &log) { logger()->info(log); } void Log::warn(const QString &log) { logger()->warn(log); } void Log::error(const QString &log) { logger()->error(log); } void Log::fatal(const QString &log) { logger()->fatal(log); }