mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-11 05:14:34 +00:00
Merge pull request #459
40540cb
Save custom log categories to persistent settings (moneromooo.monero)
This commit is contained in:
commit
fa4078f38c
2 changed files with 7 additions and 2 deletions
4
main.qml
4
main.qml
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue