7
7
using Flow . Launcher . Core . Configuration ;
8
8
using Flow . Launcher . Core . Resource ;
9
9
using Flow . Launcher . Helper ;
10
+ using Flow . Launcher . Infrastructure . Logger ;
10
11
using Flow . Launcher . Infrastructure . UserSettings ;
11
12
using Flow . Launcher . Plugin ;
12
13
using Flow . Launcher . Plugin . SharedModels ;
@@ -31,6 +32,7 @@ public class SearchWindowScreenData : DropdownDataGeneric<SearchWindowScreens> {
31
32
public class SearchWindowAlignData : DropdownDataGeneric < SearchWindowAligns > { }
32
33
public class SearchPrecisionData : DropdownDataGeneric < SearchPrecisionScore > { }
33
34
public class LastQueryModeData : DropdownDataGeneric < LastQueryMode > { }
35
+ public class LogLevelData : DropdownDataGeneric < LOGLEVEL > { }
34
36
35
37
public bool StartFlowLauncherOnSystemStartup
36
38
{
@@ -143,12 +145,16 @@ public bool PortableMode
143
145
public List < LastQueryModeData > LastQueryModes { get ; } =
144
146
DropdownDataGeneric < LastQueryMode > . GetValues < LastQueryModeData > ( "LastQuery" ) ;
145
147
148
+ public List < LogLevelData > LogLevels { get ; } =
149
+ DropdownDataGeneric < LOGLEVEL > . GetValues < LogLevelData > ( "LogLevel" ) ;
150
+
146
151
private void UpdateEnumDropdownLocalizations ( )
147
152
{
148
153
DropdownDataGeneric < SearchWindowScreens > . UpdateLabels ( SearchWindowScreens ) ;
149
154
DropdownDataGeneric < SearchWindowAligns > . UpdateLabels ( SearchWindowAligns ) ;
150
155
DropdownDataGeneric < SearchPrecisionScore > . UpdateLabels ( SearchPrecisionScores ) ;
151
156
DropdownDataGeneric < LastQueryMode > . UpdateLabels ( LastQueryModes ) ;
157
+ DropdownDataGeneric < LOGLEVEL > . UpdateLabels ( LogLevels ) ;
152
158
}
153
159
154
160
public string Language
@@ -216,6 +222,22 @@ public bool AutoUpdates
216
222
}
217
223
}
218
224
225
+ public LOGLEVEL LogLevel
226
+ {
227
+ get => Settings . LogLevel ;
228
+ set
229
+ {
230
+ if ( Settings . LogLevel != value )
231
+ {
232
+ Settings . LogLevel = value ;
233
+
234
+ Log . SetLogLevel ( value ) ;
235
+
236
+ UpdateEnumDropdownLocalizations ( ) ;
237
+ }
238
+ }
239
+ }
240
+
219
241
[ RelayCommand ]
220
242
private void SelectPython ( )
221
243
{
0 commit comments