diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 058a51ae3..2ead21cf5 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -104,6 +104,9 @@
Always Preview
Always open preview panel when Flow activates. Press {0} to toggle preview.
Shadow effect is not allowed while current theme has blur effect enabled
+ Log level
+ Debug
+ Info
Search Plugin
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index dddaa99d4..e4f88432a 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -7,6 +7,7 @@ using Flow.Launcher.Core;
using Flow.Launcher.Core.Configuration;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
+using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedModels;
@@ -31,6 +32,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public class SearchWindowAlignData : DropdownDataGeneric { }
public class SearchPrecisionData : DropdownDataGeneric { }
public class LastQueryModeData : DropdownDataGeneric { }
+ public class LogLevelData : DropdownDataGeneric { }
public bool StartFlowLauncherOnSystemStartup
{
@@ -143,12 +145,16 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
public List LastQueryModes { get; } =
DropdownDataGeneric.GetValues("LastQuery");
+ public List LogLevels { get; } =
+ DropdownDataGeneric.GetValues("LogLevel");
+
private void UpdateEnumDropdownLocalizations()
{
DropdownDataGeneric.UpdateLabels(SearchWindowScreens);
DropdownDataGeneric.UpdateLabels(SearchWindowAligns);
DropdownDataGeneric.UpdateLabels(SearchPrecisionScores);
DropdownDataGeneric.UpdateLabels(LastQueryModes);
+ DropdownDataGeneric.UpdateLabels(LogLevels);
}
public string Language
@@ -216,6 +222,22 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
}
}
+ public LOGLEVEL LogLevel
+ {
+ get => Settings.LogLevel;
+ set
+ {
+ if (Settings.LogLevel != value)
+ {
+ Settings.LogLevel = value;
+
+ Log.SetLogLevel(value);
+
+ UpdateEnumDropdownLocalizations();
+ }
+ }
+ }
+
[RelayCommand]
private void SelectPython()
{
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index a80e618e8..814eda16b 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -278,6 +278,14 @@
SelectedValue="{Binding Language}"
SelectedValuePath="LanguageCode" />
+
+
+
+