change logging
This commit is contained in:
parent
d3b38a7a48
commit
954d4fb1ce
|
@ -33,17 +33,17 @@ enum SnoreDebugLevels {
|
|||
/**
|
||||
* The most important messages, will be diplayed if the debug level >= 1
|
||||
*/
|
||||
SNORE_WARNING = 1,
|
||||
SNORE_WARNING = 0,
|
||||
|
||||
/**
|
||||
* Information messages, will be diplayed if the debug level >= 2
|
||||
*/
|
||||
SNORE_INFO = 2,
|
||||
SNORE_INFO = 1,
|
||||
|
||||
/**
|
||||
* Debug messages will be diplayed if the debug level >= 3
|
||||
*/
|
||||
SNORE_DEBUG = 3
|
||||
SNORE_DEBUG = 2
|
||||
|
||||
};
|
||||
|
||||
|
@ -53,7 +53,7 @@ enum SnoreDebugLevels {
|
|||
*/
|
||||
|
||||
#if !defined(QT_NO_DEBUG_OUTPUT)
|
||||
#define snoreDebug(X) Snore::SnoreLog( X ) << Q_FUNC_INFO
|
||||
#define snoreDebug(X) Snore::SnoreLog( X ) << #X << Q_FUNC_INFO
|
||||
#else
|
||||
#define snoreDebug(X) QNoDebug()
|
||||
#endif
|
||||
|
|
|
@ -32,8 +32,9 @@ using namespace Snore;
|
|||
SnorePlugin::SnorePlugin(const QString &name) :
|
||||
m_name(name)
|
||||
{
|
||||
Q_ASSERT_X(thread() != qApp->thread(),Q_FUNC_INFO,"Plugin initialized in wrong thread");
|
||||
if (thread() != qApp->thread()) {
|
||||
moveToThread(qApp->thread());
|
||||
snoreDebug(SNORE_WARNING) << "Plugin initialized in wrong thread.";
|
||||
}
|
||||
setDefaultValue("Enabled", false, LOCAL_SETTING);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue