diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-01-31 18:23:59 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-02-06 10:36:05 +0100 |
commit | aea6cbfa9d96f3f76bbc3b81362c54c9322b3fcb (patch) | |
tree | c140b905b53b01e509ad923a12e5b31f043f3361 /src/app/config-ui | |
parent | e5545733e8f63f62d499e73a27a72fc898a58e4e (diff) |
Remove global log sink.
Applications may not want to use the same log sink for all builds.
The logging facility is also decoupled from the command-line client in other
ways:
- The LogWriter modifiers for output channel and text color are gone,
since this type of decision should not be made by low-level code.
Instead, the "highlight" string can be forwarded to the log sink.
- The console logger now lives in app/shared, as it must never be used
by library code.
Change-Id: I8863a554c9b74577320ef23f6f934a74e0f0cbb0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/app/config-ui')
-rw-r--r-- | src/app/config-ui/config-ui.pro | 1 | ||||
-rw-r--r-- | src/app/config-ui/main.cpp | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/app/config-ui/config-ui.pro b/src/app/config-ui/config-ui.pro index 1a587587e..3bc85a691 100644 --- a/src/app/config-ui/config-ui.pro +++ b/src/app/config-ui/config-ui.pro @@ -9,3 +9,4 @@ SOURCES = settingsmodel.cpp mainwindow.cpp main.cpp FORMS = mainwindow.ui include(../../lib/use.pri) +include(../shared/logging/logging.pri) diff --git a/src/app/config-ui/main.cpp b/src/app/config-ui/main.cpp index 43f6b300e..17d3c0383 100644 --- a/src/app/config-ui/main.cpp +++ b/src/app/config-ui/main.cpp @@ -28,27 +28,26 @@ ****************************************************************************/ #include "mainwindow.h" +#include "../shared/logging/consolelogger.h" #include "../shared/qbssettings.h" -#include <logging/consolelogger.h> #include <logging/translator.h> #include <QApplication> #include <cstdlib> -using namespace qbs; +using qbs::Internal::Tr; int main(int argc, char *argv[]) { QApplication app(argc, argv); SettingsPtr settings = qbsSettings(); - ConsoleLogger cl(settings.data()); + ConsoleLogger::instance(settings.data()); const QStringList args = app.arguments().mid(1); if (args.count() == 1 && (args.first() == QLatin1String("--help") || args.first() == QLatin1String("-h"))) { - qbsInfo() << DontPrintLogLevel << LogOutputStdOut - << Tr::tr("This tool displays qbs settings in a GUI.\n" + qbsInfo() << Tr::tr("This tool displays qbs settings in a GUI.\n" "If you have more than a few settings, this might be preferable to " "plain \"qbs config\", as it presents a hierarchical view."); return EXIT_SUCCESS; |