Skip to content

Commit 2ae57ae

Browse files
committed
Format & Improve string resources & Rename enums
1 parent d4a757b commit 2ae57ae

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

Flow.Launcher.Infrastructure/Logger/Log.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static class Log
1616

1717
public static string CurrentLogDirectory { get; }
1818

19-
static Log()
19+
static Log()
2020
{
2121
CurrentLogDirectory = DataLocation.VersionLogDirectory;
2222
if (!Directory.Exists(CurrentLogDirectory))
@@ -45,8 +45,6 @@ static Log()
4545
Layout = layout
4646
};
4747

48-
49-
5048
configuration.AddTarget("file", fileTargetASyncWrapper);
5149
configuration.AddTarget("debug", debugTarget);
5250

@@ -71,9 +69,9 @@ public static void SetLogLevel(LOGLEVEL level)
7169

7270
var nlogLevel = level switch
7371
{
74-
LOGLEVEL.None => LogLevel.Off,
75-
LOGLEVEL.Error => LogLevel.Error,
76-
LOGLEVEL.Debug => LogLevel.Debug,
72+
LOGLEVEL.NONE => LogLevel.Off,
73+
LOGLEVEL.ERROR => LogLevel.Error,
74+
LOGLEVEL.DEBUG => LogLevel.Debug,
7775
_ => LogLevel.Info
7876
};
7977

@@ -167,9 +165,9 @@ public static void Warn(string className, string message, [CallerMemberName] str
167165

168166
public enum LOGLEVEL
169167
{
170-
None,
171-
Error,
172-
Info,
173-
Debug
168+
NONE,
169+
ERROR,
170+
INFO,
171+
DEBUG
174172
}
175173
}

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections.Generic;
1+
using System.Collections.Generic;
22
using System.Collections.ObjectModel;
33
using System.Text.Json.Serialization;
44
using System.Windows;
@@ -340,7 +340,7 @@ public CustomBrowserViewModel CustomBrowser
340340
public DialogJumpFileResultBehaviours DialogJumpFileResultBehaviour { get; set; } = DialogJumpFileResultBehaviours.FullPath;
341341

342342
[JsonConverter(typeof(JsonStringEnumConverter))]
343-
public LOGLEVEL LogLevel { get; set; } = LOGLEVEL.Info;
343+
public LOGLEVEL LogLevel { get; set; } = LOGLEVEL.INFO;
344344

345345
/// <summary>
346346
/// when false Alphabet static service will always return empty results

Flow.Launcher/Languages/en.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@
459459
<system:String x:Key="welcomewindow">Wizard</system:String>
460460
<system:String x:Key="userdatapath">User Data Location</system:String>
461461
<system:String x:Key="userdatapathToolTip">User settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.</system:String>
462-
<system:String x:Key="userdatapathButton">Open Folder</system:String>
462+
<system:String x:Key="userdatapathButton">Open Folder</system:String>
463463
<system:String x:Key="advanced">Advanced</system:String>
464464
<system:String x:Key="logLevel">Log Level</system:String>
465-
<system:String x:Key="LogLevelNone">None</system:String>
466-
<system:String x:Key="LogLevelError">Error</system:String>
467-
<system:String x:Key="LogLevelInfo">Info</system:String>
468-
<system:String x:Key="LogLevelDebug">Debug</system:String>
465+
<system:String x:Key="LogLevelNONE">Silent</system:String>
466+
<system:String x:Key="LogLevelERROR">Error</system:String>
467+
<system:String x:Key="LogLevelINFO">Info</system:String>
468+
<system:String x:Key="LogLevelDEBUG">Debug</system:String>
469469
<system:String x:Key="settingWindowFontTitle">Setting Window Font</system:String>
470470

471471
<!-- Release Notes Window -->

0 commit comments

Comments
 (0)