mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
Save custom log categories to persistent settings
This commit is contained in:
parent
6965b0af19
commit
40540cb38a
2 changed files with 7 additions and 2 deletions
6
main.qml
6
main.qml
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue