Merge pull request #459

40540cb Save custom log categories to persistent settings (moneromooo.monero)
This commit is contained in:
Riccardo Spagni 2017-02-08 12:43:29 +02:00
commit fa4078f38c
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 7 additions and 2 deletions

View file

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

View file

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