mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[calamares] Default to log-level 1 (not 8)
- This bug has been here since f233cac7a1
,
where a check for isSet() (of the -D option) was dropped. So since then,
Calamares has always been running with full logging (-D8) on.
- The recently-added "easter egg" of showing the debug-button when
log-level is 8 (to allow debugging-in-production) trips over the
default-log-level of 8, so the debug-button is always visible.
So, minor bugs in the debugging-setup, combine to show a debug-button
when there shouldn't be one.
FIXES #1329
This commit is contained in:
parent
aacdb6be29
commit
8f060a741f
1 changed files with 13 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2017-2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -36,9 +36,21 @@
|
|||
#include <QDebug>
|
||||
#include <QDir>
|
||||
|
||||
/** @brief Gets debug-level from -D command-line-option
|
||||
*
|
||||
* If unset, use LOGERROR (corresponding to -D1), although
|
||||
* effectively -D2 is the lowest level you can set for
|
||||
* logging-to-the-console, and everything always gets
|
||||
* logged to the session file).
|
||||
*/
|
||||
static unsigned int
|
||||
debug_level( QCommandLineParser& parser, QCommandLineOption& levelOption )
|
||||
{
|
||||
if ( !parser.isSet( levelOption ) )
|
||||
{
|
||||
return Logger::LOGERROR;
|
||||
}
|
||||
|
||||
bool ok = true;
|
||||
int l = parser.value( levelOption ).toInt( &ok );
|
||||
if ( !ok || ( l < 0 ) )
|
||||
|
|
Loading…
Add table
Reference in a new issue