projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ssl: Use QSslSocket directly to avoid redundant qobject_casts
[quassel.git]
/
src
/
common
/
logger.h
diff --git
a/src/common/logger.h
b/src/common/logger.h
index
3755abf
..
6c5c1d0
100644
(file)
--- a/
src/common/logger.h
+++ b/
src/common/logger.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
19
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-50,11
+50,18
@@
public:
Fatal
};
Fatal
};
- struct LogEntry
+ struct
COMMON_EXPORT
LogEntry
{
QDateTime timeStamp;
LogLevel logLevel;
QString message;
{
QDateTime timeStamp;
LogLevel logLevel;
QString message;
+
+ /**
+ * Gets this log entry in a printable format, with timestamp and log level
+ *
+ * @return the log entry, formatted with timestamp and log level
+ */
+ QString toString() const;
};
/**
};
/**
@@
-111,6
+118,7
@@
private:
std::vector<LogEntry> _messages;
bool _keepMessages{true};
bool _initialized{false};
std::vector<LogEntry> _messages;
bool _keepMessages{true};
bool _initialized{false};
+ QByteArray _prgname;
};
Q_DECLARE_METATYPE(Logger::LogEntry)
};
Q_DECLARE_METATYPE(Logger::LogEntry)