10 #include <QThreadStorage> 12 #include <QStringList> 74 Logger(
const QString msgFormat=
"{timestamp} {type} {msg}",
const QString timestampFormat=
"yyyy-MM-dd HH:mm:ss.zzz",
const QtMsgType minLevel=QtDebugMsg,
const int bufferSize=0, QObject* parent = 0);
89 virtual void log(
const QtMsgType type,
const QString& message,
const QString &file=
"",
const QString &
function=
"",
const int line=0);
95 void installMsgHandler();
101 minLevel = minMsgLevel;
117 static void set(
const QString& name,
const QString& value);
125 virtual void clear(
const bool buffer=
true,
const bool variables=
true);
148 virtual void write(
const LogMessage* logMessage);
168 static void msgHandler(
const QtMsgType type,
const QString &message,
const QString &file=
"",
const QString &
function=
"",
const int line=0);
171 #if QT_VERSION >= 0x050000 180 static void msgHandler5(
const QtMsgType type,
const QMessageLogContext& context,
const QString &message);
190 static void msgHandler4(
const QtMsgType type,
const char * message);
195 static QThreadStorage<QHash<QString,QString>*>
logVars;
Fixed< IntType, IntBits > log(Fixed< IntType, IntBits > const &x)
static QThreadStorage< QHash< QString, QString > * > logVars
QtMsgType getMinMessageLevel() const
void setMinMessageLevel(const QtMsgType &minMsgLevel)
QThreadStorage< QList< LogMessage * > * > buffers
static Logger * defaultLogger