mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Add option to change log file max size with [ui] logs_max_size
This commit is contained in:
parent
47be8c3432
commit
9fb849907f
3 changed files with 8 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ void Logger::init (const shared_ptr<linphone::Config> &config) {
|
|||
|
||||
linphone::Core::setLogCollectionPrefix(EXECUTABLE_NAME);
|
||||
linphone::Core::setLogCollectionPath(Utils::appStringToCoreString(folder));
|
||||
linphone::Core::setLogCollectionMaxFileSize(Constants::MaxLogsCollectionSize);
|
||||
linphone::Core::setLogCollectionMaxFileSize(SettingsModel::getMaxLogsCollectionSize(config));
|
||||
|
||||
mInstance->enableFullLogs(SettingsModel::getFullLogsEnabled(config));
|
||||
mInstance->enable(SettingsModel::getLogsEnabled(config));
|
||||
|
|
|
|||
|
|
@ -1979,6 +1979,12 @@ QString SettingsModel::getLogsFolder (const shared_ptr<linphone::Config> &config
|
|||
: Paths::getLogsDirPath());
|
||||
}
|
||||
|
||||
size_t SettingsModel::getMaxLogsCollectionSize (const shared_ptr<linphone::Config> &config) {
|
||||
return config
|
||||
? config->getInt(UiSection, "logs_max_size", Constants::MaxLogsCollectionSize)
|
||||
: Constants::MaxLogsCollectionSize;
|
||||
}
|
||||
|
||||
bool SettingsModel::getLogsEnabled (const shared_ptr<linphone::Config> &config) {
|
||||
return config ? config->getInt(UiSection, "logs_enabled", false) : true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -702,6 +702,7 @@ public:
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
static QString getLogsFolder (const std::shared_ptr<linphone::Config> &config);
|
||||
static size_t getMaxLogsCollectionSize (const std::shared_ptr<linphone::Config> &config);
|
||||
static bool getLogsEnabled (const std::shared_ptr<linphone::Config> &config);
|
||||
static bool getFullLogsEnabled (const std::shared_ptr<linphone::Config> &config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue