uno.extensions icon indicating copy to clipboard operation
uno.extensions copied to clipboard

Serilog does not log to file in WinUI

Open frogcrush opened this issue 6 months ago • 0 comments

Current behavior

Using UseSerilog(fileLoggingEnabled: true) has no effect on a WinUI app.

Expected behavior

Log files should be generated in the app folder.

How to reproduce it (as minimally and precisely as possible)

  • Create a new WinUI Uno app with Serilog
  • Enable file logging as above
  • See no log file output on Windows

Environment

Nuget Package (s): Uno.Extensions.logging.Serilog

Package Version(s): 4.2.0-dev.81

Affected platform(s):

  • [ ] iOS
  • [ ] macOS (AppKit)
  • [ ] Mac Catalyst
  • [ ] Android
  • [ ] WebAssembly
  • [X] Windows
  • [ ] Skia (WPF)
  • [ ] Skia (GTK on Linux/macOS/Windows)
  • [ ] Skia (Linux Framebuffer)
  • [ ] Build tasks

Anything else we need to know?

Looking at the code it checks for #if NETSTANDARD which might not apply in WinUI but would have in UWP?

frogcrush avatar Aug 01 '24 19:08 frogcrush