forked from quickshell/quickshell
core/log: create fully detailed logs by default
The .qslog logs now log messages for quickshell* by default.
This commit is contained in:
parent
291179ede2
commit
0fc98652a8
4 changed files with 85 additions and 13 deletions
|
@ -2,8 +2,8 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <CLI/CLI.hpp> // NOLINT: Need to include this for impls of some CLI11 classes
|
||||
#include <CLI/App.hpp>
|
||||
#include <CLI/CLI.hpp> // NOLINT: Need to include this for impls of some CLI11 classes
|
||||
#include <CLI/Validators.hpp>
|
||||
#include <qapplication.h>
|
||||
#include <qcoreapplication.h>
|
||||
|
@ -129,9 +129,16 @@ int qs_main(int argc, char** argv) {
|
|||
->needs(debugPortArg);
|
||||
|
||||
/// ---
|
||||
bool sparseLogsOnly = false;
|
||||
app.add_flag("--info", printInfo, "Print information about the shell")->excludes(debugPortArg);
|
||||
app.add_flag("--no-color", noColor, "Do not color the log output. (Env:NO_COLOR)");
|
||||
|
||||
app.add_flag(
|
||||
"--no-detailed-logs",
|
||||
sparseLogsOnly,
|
||||
"Do not enable this unless you know what you are doing."
|
||||
);
|
||||
|
||||
/// ---
|
||||
QStringOption logpath;
|
||||
auto* readLog = app.add_subcommand("read-log", "Read a quickshell log file.");
|
||||
|
@ -143,7 +150,7 @@ int qs_main(int argc, char** argv) {
|
|||
const auto qApplication = QCoreApplication(qArgC, qArgV);
|
||||
|
||||
// Start log manager - has to happen with an active event loop or offthread can't be started.
|
||||
LogManager::init(!noColor);
|
||||
LogManager::init(!noColor, sparseLogsOnly);
|
||||
|
||||
if (*readLog) {
|
||||
auto file = QFile(*logpath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue