Is there any logging framework which supports Portable Class Library? I searched on Nuget but failed to find any.
Thanks,
Not sure, if there is logging framework targeting directly Portable Class Library, but nothing stops you from implementing logging in your PCL using Dependency Injection - create interface for logging service and implement it in all target platforms separately using your favorite, or even different libraries. You have then more control over specific logging settings - it's quite different approach for logging in .NET WPF app, WP8 app or Windows Store app.
I'll answer my own question:
Common.Logging, a widely-used portable logging abstraction for .NET, became PCL compatible in early 2014 (around version 2.2.0). I used Common.Logging in most of my libraries (PCL and non-PCL) and it just works perfectly.
Check out Splat.
A library to make things cross-platform that should be
It's a small PCL library with some useful cross-platform classes including logging...
https://github.com/paulcbetts/splat/blob/master/Splat/Logging.cs
You can get it from NuGet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With