From 4d2ce949b3b41f8bf0af446fa20205ddd229e579 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 3 Nov 2013 11:08:18 +0100 Subject: Use cutelogger for Rockbox Utility internal trace. Change tracing from qDebug() to use cutelogger, which is available under the LGPL2.1. This allows to automatically add filename and line number to the log, and also provides multiple log levels. Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910 --- rbutil/rbutilqt/base/bootloaderinstallfile.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'rbutil/rbutilqt/base/bootloaderinstallfile.cpp') diff --git a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp index fc293e5..70867b8 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp @@ -20,6 +20,7 @@ #include #include "bootloaderinstallfile.h" #include "utils.h" +#include "Logger.h" BootloaderInstallFile::BootloaderInstallFile(QObject *parent) @@ -31,7 +32,7 @@ BootloaderInstallFile::BootloaderInstallFile(QObject *parent) bool BootloaderInstallFile::install(void) { emit logItem(tr("Downloading bootloader"), LOGINFO); - qDebug() << "[BootloaderInstallFile] installing bootloader"; + LOG_INFO() << "installing bootloader"; downloadBlStart(m_blurl); connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); return true; @@ -46,7 +47,7 @@ void BootloaderInstallFile::installStage2(void) QString fwfile(Utils::resolvePathCase(m_blfile)); if(!fwfile.isEmpty()) { QString moved = Utils::resolvePathCase(m_blfile) + ".ORIG"; - qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved; + LOG_INFO() << "renaming" << fwfile << "to" << moved; QFile::rename(fwfile, moved); } @@ -80,8 +81,8 @@ void BootloaderInstallFile::installStage2(void) // place (new) bootloader m_tempfile.open(); - qDebug() << "[BootloaderInstallFile] renaming" << m_tempfile.fileName() - << "to" << fwfile; + LOG_INFO() << "renaming" << m_tempfile.fileName() + << "to" << fwfile; m_tempfile.close(); if(!Utils::resolvePathCase(fwfile).isEmpty()) { @@ -106,7 +107,7 @@ void BootloaderInstallFile::installStage2(void) bool BootloaderInstallFile::uninstall(void) { - qDebug() << "[BootloaderInstallFile] Uninstalling bootloader"; + LOG_INFO() << "Uninstalling bootloader"; emit logItem(tr("Removing Rockbox bootloader"), LOGINFO); // check if a .ORIG file is present, and allow moving it back. QString origbl = Utils::resolvePathCase(m_blfile + ".ORIG"); @@ -138,7 +139,7 @@ bool BootloaderInstallFile::uninstall(void) //! @return BootloaderRockbox, BootloaderOther or BootloaderUnknown. BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) { - qDebug() << "[BootloaderInstallFile] checking installed bootloader"; + LOG_INFO() << "checking installed bootloader"; if(!Utils::resolvePathCase(m_blfile).isEmpty() && !Utils::resolvePathCase(m_blfile + ".ORIG").isEmpty()) return BootloaderRockbox; @@ -151,7 +152,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void) BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void) { - qDebug() << "[BootloaderInstallFile] getting capabilities"; + LOG_INFO() << "getting capabilities"; return Install | Uninstall | IsFile | CanCheckInstalled | Backup; } -- cgit v1.1