added datetime logging category and update man page
This commit is contained in:
parent
5bbf1fc70b
commit
6d7984496e
22
debian/guhd.1
vendored
22
debian/guhd.1
vendored
@ -27,27 +27,33 @@ Debug categories to enable. Prefix with \"No\" to disable. Warnings from all
|
|||||||
categories will be printed unless explicitly muted with "NoWarnings".
|
categories will be printed unless explicitly muted with "NoWarnings".
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
Categories are:
|
\fBMain\ debug\ categories:\fR
|
||||||
.IP \fIApplication\fR\ (default\ enabled)
|
.IP \fIApplication\fR\ (default\ enabled)
|
||||||
Print the debug messages from the core application.
|
Print the debug messages from the core application.
|
||||||
.IP \fICommandLauncher\fR\ (default\ disabled)
|
|
||||||
Print the debug messages from the command launcher device plugin.
|
|
||||||
.IP \fIConnection\fR\ (default\ enabled)
|
.IP \fIConnection\fR\ (default\ enabled)
|
||||||
Print the debug messages from the TCP connections in guh.
|
Print the debug messages from the TCP connections in guh.
|
||||||
.IP \fIDeviceManager\fR\ (default\ enabled)
|
.IP \fIDeviceManager\fR\ (default\ enabled)
|
||||||
Print the debug messages from the device manager.
|
Print the debug messages from the device manager.
|
||||||
.IP \fIEQ-3\fR\ (default\ disabled)
|
|
||||||
Print the debug messages from eQ-3 device plugin.
|
|
||||||
.IP \fIHardware\fR\ (default\ disabled)
|
.IP \fIHardware\fR\ (default\ disabled)
|
||||||
Print the debug messages from hardware resources in guh.
|
Print the debug messages from hardware resources in guh.
|
||||||
.IP \fIJsonRpc\fR\ (default\ disabled)
|
.IP \fIJsonRpc\fR\ (default\ disabled)
|
||||||
Print the debug messages from JSON-RPC interface.
|
Print the debug messages from JSON-RPC interface.
|
||||||
|
.IP \fILogEngine\fR\ (default\ disabled)
|
||||||
|
Print the debug messages from logging engine.
|
||||||
|
.IP \fIRuleEngine\fR\ (default\ enabled)
|
||||||
|
Print the debug messages from the rule engine.
|
||||||
|
.TP
|
||||||
|
\fBDebug\ categories\ for\ plugins:\fR
|
||||||
|
.IP \fICommandLauncher\fR\ (default\ disabled)
|
||||||
|
Print the debug messages from the command launcher device plugin.
|
||||||
|
.IP \fIDateTime\fR\ (default\ disabled)
|
||||||
|
Print the debug messages from the date/time device plugin.
|
||||||
|
.IP \fIEQ-3\fR\ (default\ disabled)
|
||||||
|
Print the debug messages from eQ-3 device plugin.
|
||||||
.IP \fILgSmartTv\fR\ (default\ disabled)
|
.IP \fILgSmartTv\fR\ (default\ disabled)
|
||||||
Print the debug messages from Lg Smart Tv device plugin.
|
Print the debug messages from Lg Smart Tv device plugin.
|
||||||
.IP \fILircd\fR\ (default\ disabled)
|
.IP \fILircd\fR\ (default\ disabled)
|
||||||
Print the debug messages from lircd device plugin.
|
Print the debug messages from lircd device plugin.
|
||||||
.IP \fILogEngine\fR\ (default\ disabled)
|
|
||||||
Print the debug messages from logging engine.
|
|
||||||
.IP \fIMailNotification\fR\ (default\ disabled)
|
.IP \fIMailNotification\fR\ (default\ disabled)
|
||||||
Print the debug messages from the mail notification device plugin.
|
Print the debug messages from the mail notification device plugin.
|
||||||
.IP \fIMock\fR\ (default\ disabled)
|
.IP \fIMock\fR\ (default\ disabled)
|
||||||
@ -59,8 +65,6 @@ Print the debug messages from the Philips Hue device plugin.
|
|||||||
.IP \fIRF433\fR\ (default\ disabled)
|
.IP \fIRF433\fR\ (default\ disabled)
|
||||||
Print the debug messages from the RF 433 MHz plugins. Each plugin which uses the RF 433 MHz
|
Print the debug messages from the RF 433 MHz plugins. Each plugin which uses the RF 433 MHz
|
||||||
hardware resource is in this debug caterogry.
|
hardware resource is in this debug caterogry.
|
||||||
.IP \fIRuleEngine\fR\ (default\ enabled)
|
|
||||||
Print the debug messages from the rule engine.
|
|
||||||
.IP \fITune\fR\ (default\ disabled)
|
.IP \fITune\fR\ (default\ disabled)
|
||||||
Print the debug messages from the tune device plugin.
|
Print the debug messages from the tune device plugin.
|
||||||
.IP \fIUdpCommander\fR\ (default\ disabled)
|
.IP \fIUdpCommander\fR\ (default\ disabled)
|
||||||
|
|||||||
@ -35,6 +35,7 @@ Q_LOGGING_CATEGORY(dcBoblight, "Boblight")
|
|||||||
|
|
||||||
Q_LOGGING_CATEGORY(dcCommandLauncher, "CommandLauncher")
|
Q_LOGGING_CATEGORY(dcCommandLauncher, "CommandLauncher")
|
||||||
Q_LOGGING_CATEGORY(dcRF433, "RF433")
|
Q_LOGGING_CATEGORY(dcRF433, "RF433")
|
||||||
|
Q_LOGGING_CATEGORY(dcDateTime, "DateTime")
|
||||||
Q_LOGGING_CATEGORY(dcEQ3, "EQ-3")
|
Q_LOGGING_CATEGORY(dcEQ3, "EQ-3")
|
||||||
Q_LOGGING_CATEGORY(dcLgSmartTv, "LgSmartTv")
|
Q_LOGGING_CATEGORY(dcLgSmartTv, "LgSmartTv")
|
||||||
Q_LOGGING_CATEGORY(dcLircd, "Lircd")
|
Q_LOGGING_CATEGORY(dcLircd, "Lircd")
|
||||||
|
|||||||
@ -40,6 +40,7 @@ Q_DECLARE_LOGGING_CATEGORY(dcBoblight)
|
|||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcCommandLauncher)
|
Q_DECLARE_LOGGING_CATEGORY(dcCommandLauncher)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcRF433)
|
Q_DECLARE_LOGGING_CATEGORY(dcRF433)
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(dcDateTime)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcEQ3)
|
Q_DECLARE_LOGGING_CATEGORY(dcEQ3)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcLgSmartTv)
|
Q_DECLARE_LOGGING_CATEGORY(dcLgSmartTv)
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcLircd)
|
Q_DECLARE_LOGGING_CATEGORY(dcLircd)
|
||||||
|
|||||||
@ -82,6 +82,7 @@
|
|||||||
#include "plugin/device.h"
|
#include "plugin/device.h"
|
||||||
#include "devicemanager.h"
|
#include "devicemanager.h"
|
||||||
#include "plugininfo.h"
|
#include "plugininfo.h"
|
||||||
|
#include "loggingcategories.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ DeviceManager::DeviceSetupStatus DevicePluginDateTime::setupDevice(Device *devic
|
|||||||
|
|
||||||
if(m_timeZone.isValid()){
|
if(m_timeZone.isValid()){
|
||||||
QDateTime zoneTime = QDateTime(QDate::currentDate(), QTime::currentTime(), m_timeZone).toLocalTime();
|
QDateTime zoneTime = QDateTime(QDate::currentDate(), QTime::currentTime(), m_timeZone).toLocalTime();
|
||||||
qDebug() << zoneTime.toLocalTime().date() << zoneTime.toLocalTime().time() << QLocale::countryToString(m_timeZone.country());
|
qCDebug(dcDateTime) << zoneTime.toLocalTime().date() << zoneTime.toLocalTime().time() << QLocale::countryToString(m_timeZone.country());
|
||||||
m_timer->start();
|
m_timer->start();
|
||||||
|
|
||||||
return DeviceManager::DeviceSetupStatusSuccess;
|
return DeviceManager::DeviceSetupStatusSuccess;
|
||||||
|
|||||||
@ -55,7 +55,7 @@ void TvEventHandler::readClient()
|
|||||||
|
|
||||||
// reject everything, except the tv
|
// reject everything, except the tv
|
||||||
if(socket->peerAddress() != m_host){
|
if(socket->peerAddress() != m_host){
|
||||||
qWarning() << "reject connection from " << socket->peerAddress().toString();
|
qCWarning(dcLgSmartTv) << "reject connection from " << socket->peerAddress().toString();
|
||||||
socket->close();
|
socket->close();
|
||||||
if (socket->state() == QTcpSocket::UnconnectedState) {
|
if (socket->state() == QTcpSocket::UnconnectedState) {
|
||||||
delete socket;
|
delete socket;
|
||||||
|
|||||||
@ -130,7 +130,7 @@ void DevicePluginOpenweathermap::deviceRemoved(Device *device)
|
|||||||
void DevicePluginOpenweathermap::networkManagerReplyReady(QNetworkReply *reply)
|
void DevicePluginOpenweathermap::networkManagerReplyReady(QNetworkReply *reply)
|
||||||
{
|
{
|
||||||
if (reply->error()) {
|
if (reply->error()) {
|
||||||
qWarning() << "ERROR: OpenWeatherMap reply error: " << reply->errorString();
|
qCWarning(dcOpenweathermap) << "OpenWeatherMap reply error: " << reply->errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_autodetectionReplies.contains(reply)) {
|
if (m_autodetectionReplies.contains(reply)) {
|
||||||
@ -219,7 +219,7 @@ void DevicePluginOpenweathermap::processAutodetectResponse(QByteArray data)
|
|||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error);
|
||||||
|
|
||||||
if(error.error != QJsonParseError::NoError) {
|
if(error.error != QJsonParseError::NoError) {
|
||||||
qWarning() << "failed to parse data" << data << ":" << error.errorString();
|
qCWarning(dcOpenweathermap) << "failed to parse data" << data << ":" << error.errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// search by geographic coordinates
|
// search by geographic coordinates
|
||||||
|
|||||||
@ -68,6 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
s_loggingFilters.insert("CommandLauncher", false);
|
s_loggingFilters.insert("CommandLauncher", false);
|
||||||
s_loggingFilters.insert("RF433", false);
|
s_loggingFilters.insert("RF433", false);
|
||||||
|
s_loggingFilters.insert("DateTime", false);
|
||||||
s_loggingFilters.insert("EQ-3", false);
|
s_loggingFilters.insert("EQ-3", false);
|
||||||
s_loggingFilters.insert("LgSmartTv", false);
|
s_loggingFilters.insert("LgSmartTv", false);
|
||||||
s_loggingFilters.insert("Lircd", false);
|
s_loggingFilters.insert("Lircd", false);
|
||||||
@ -113,7 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
if (s_loggingFilters.contains(debugArea)) {
|
if (s_loggingFilters.contains(debugArea)) {
|
||||||
s_loggingFilters[debugArea] = enable;
|
s_loggingFilters[debugArea] = enable;
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "No such debug category:" << debugArea;
|
qCWarning(dcApplication) << "No such debug category:" << debugArea;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QLoggingCategory::installFilter(loggingCategoryFilter);
|
QLoggingCategory::installFilter(loggingCategoryFilter);
|
||||||
|
|||||||
Reference in New Issue
Block a user