diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index bdf745052..f386a3fe5 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -162,6 +162,8 @@
DevTools
Setting Folder
Log Folder
+ Clear Logs
+ Are you sure you want to delete the entire log?
Wizard
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index ba6569771..82306634b 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -2523,6 +2523,10 @@
Margin="0,0,12,0"
Click="OpenSettingFolder"
Content="{DynamicResource settingfolder}" />
+
diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs
index 10c9aeffe..9836507f7 100644
--- a/Flow.Launcher/SettingWindow.xaml.cs
+++ b/Flow.Launcher/SettingWindow.xaml.cs
@@ -269,6 +269,23 @@ namespace Flow.Launcher
{
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Logs, Constant.Version));
}
+ private void ClearLogFolder(object sender, RoutedEventArgs e)
+ {
+ var confirmResult = MessageBox.Show(InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),InternationalizationManager.Instance.GetTranslation("clearlogfolder"), MessageBoxButton.YesNo);
+ if (confirmResult == MessageBoxResult.Yes)
+ {
+ DirectoryInfo Di = new DirectoryInfo(Path.Combine(DataLocation.DataDirectory(), Constant.Logs, Constant.Version));
+ FileInfo[] files = Di.GetFiles();
+ foreach (FileInfo file in files)
+ {
+ file.Delete();
+ }
+ }
+ else
+ {
+ }
+
+ }
private void OnPluginStoreRefreshClick(object sender, RoutedEventArgs e)
{