Save custom log categories to persistent settings

This commit is contained in:
moneromooo.monero 2017-02-05 12:38:43 +00:00
parent 6965b0af19
commit 40540cb38a
2 changed files with 7 additions and 2 deletions

View file

@ -160,7 +160,10 @@ ApplicationWindow {
walletInitialized = false;
// Use stored log level
walletManager.setLogLevel(persistentSettings.logLevel)
if (persistentSettings.logLevel == 5)
walletManager.setLogCategories(persistentSettings.logCategories)
else
walletManager.setLogLevel(persistentSettings.logLevel)
// setup language
var locale = persistentSettings.locale
@ -785,6 +788,7 @@ ApplicationWindow {
property bool customDecorations : true
property string daemonFlags
property int logLevel: 0
property string logCategories: ""
}
// Information dialog

View file

@ -388,13 +388,14 @@ Rectangle {
id: logCategories
Layout.preferredWidth: 200
Layout.fillWidth: true
text: ""
text: appWindow.persistentSettings.logCategories
placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
enabled: logLevel.currentIndex == 5
onEditingFinished: {
if(enabled) {
console.log("log categories changed: ", text);
walletManager.setLogCategories(text);
appWindow.persistentSettings.logCategories = text;
}
}
}