Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMcCarthy committed May 17, 2024
1 parent ee9726d commit f3fdfb5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions DevCraftAspire.ApiService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@

app.MapDefaultEndpoints();

#if RELEASE

// For REST service errors
//var logFilePath = "_traceoutput.log";
//File.SetUnixFileMode(logFilePath, UnixFileMode.UserRead | UnixFileMode.UserWrite);
//System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(File.CreateText(logFilePath)));
//System.Diagnostics.Trace.AutoFlush = true;
var logFilePath = "/var/log/_traceoutput.log";
File.SetUnixFileMode(logFilePath, UnixFileMode.UserRead | UnixFileMode.UserWrite);

Check warning on line 56 in DevCraftAspire.ApiService/Program.cs

View workflow job for this annotation

GitHub Actions / build_app

This call site is reachable on all platforms. 'File.SetUnixFileMode(string, UnixFileMode)' is unsupported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check warning on line 56 in DevCraftAspire.ApiService/Program.cs

View workflow job for this annotation

GitHub Actions / build_app

This call site is reachable on all platforms. 'File.SetUnixFileMode(string, UnixFileMode)' is unsupported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.TextWriterTraceListener());
System.Diagnostics.Trace.AutoFlush = true;
#endif


app.Run();

0 comments on commit f3fdfb5

Please sign in to comment.