Skip to content

Commit

Permalink
Merge pull request #108 from ChrisFeline/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ChrisFeline authored Dec 27, 2024
2 parents d209083 + 98baa35 commit 240a961
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: .NET Core Desktop

on:
push:
branches: [ "main", "dev" ]
branches: [ "main", "dev", "test" ]
paths-ignore:
- '**.md' # Ignore markdown files
- '**.png' # Ignore image files
Expand Down
2 changes: 1 addition & 1 deletion Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal static class Logger {

private static readonly StreamWriter LogFileWriter;
static Logger () {
LogFileWriter = new StreamWriter("output.log", append: false);
LogFileWriter = new StreamWriter(Path.Combine(Program.DataLocation, "output.log"), append: false);
}

internal static void Log(string? message, LogType logType = LogType.Log) {
Expand Down
9 changes: 8 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ internal static bool ContainsArg(string arg) {
[STAThread]
static void Main(string[] args)
{
Directory.SetCurrentDirectory(ProgramDirectory);
Logger.Log("Initializing logging.");

try {
Directory.SetCurrentDirectory(ProgramDirectory);
Logger.Log("Program Directory: " + ProgramDirectory);
} catch (Exception e) {
Logger.Error("Failed to set Program Directory to: " + ProgramDirectory);
Logger.Error(e.ToString());
}

Arguments = args;
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
Expand Down

0 comments on commit 240a961

Please sign in to comment.