Skip to content

NLog MauiLog Target for writing to Apple Unified Logging OSLog / Android.Util.Log for LogCat

License

Notifications You must be signed in to change notification settings

bfmyr4/NLog.Targets.MauiLog

 
 

Repository files navigation

NLog.Targets.MauiLog

NLog Target for debugging on MAUI / Xamarin Mobile Platforms:

  • Apple iOS / MacOS - Unified Logging OSLog (replacement of print and NSLog)
  • Android - Android.Util.Log / LogCat
  • NetStandard - System.Diagnostics.Debugger.Log

Version AppVeyor

How to use

  1. Install the package

    Install-Package NLog.Targets.MauiLog or in your csproj:

    <PackageReference Include="NLog.Targets.MauiLog" Version="1.*" />
  2. Add to your nlog.config:

    <extensions>
        <add assembly="NLog.Targets.MauiLog"/>
    </extensions>
  3. Use the target "mauilog" in your nlog.config

    <targets>
        <target name="mauilog" type="MauiLog" />
    </targets>
    <rules>
        <logger minLevel="Info" writeTo="mauilog" />
    </rules>

Configuration options for MAUI Log Target

  • Layout - LogEvent message layout
  • Category - LogEvent category layout (optional)

About

NLog MauiLog Target for writing to Apple Unified Logging OSLog / Android.Util.Log for LogCat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%