mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
80f7683a57
Nheko is very chatty in its log output, generating log noise (which complicates diagnostics) and needless disk writes (which affect power consumption and SSD life). This patch introduces command line options and environment variables to control log levels and output type. The old --debug command line option still works, at least for now. It is overridden by the new command line options when they are used. Partially addresses #665.
34 lines
542 B
C++
34 lines
542 B
C++
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
|
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <QString>
|
|
|
|
#include "spdlog/logger.h"
|
|
|
|
namespace nhlog {
|
|
void
|
|
init(const QString &level, const QString &path, bool to_stderr);
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
ui();
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
net();
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
db();
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
crypto();
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
qml();
|
|
|
|
}
|