serilog-sinks-xamarin icon indicating copy to clipboard operation
serilog-sinks-xamarin copied to clipboard

Support Apple Unified Logging

Open allenhumphreys opened this issue 7 years ago • 9 comments
trafficstars

Do you want to request a feature or report a bug? Feature

What is the current behavior? Only supports NSLog on iOS

What is the motivation / use case for changing the behavior? Support Unified Logging

allenhumphreys avatar Nov 13 '18 17:11 allenhumphreys

Currently does the iOS sink write to the Console, rather than actually writing to NSLog?

From what I can see here NSLogSink.cs L38 it is just simply writing out to Console.WriteLine()

FinHorsley avatar Sep 11 '19 10:09 FinHorsley

They are one and the same. At least they were when the code was written.

Sent from my iPhone

On Sep 11, 2019, at 3:27 AM, FinHorsley [email protected] wrote:

Currently does the iOS sink write to the Console, rather than actually writing to NSLog?

From what I can see here NSLogSink.cs L38 it is just simply writing out to Console.WriteLine()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nberardi avatar Sep 11 '19 13:09 nberardi

Great 🙂

FinHorsley avatar Sep 12 '19 08:09 FinHorsley

They are one and the same. At least they were when the code was written.

Well, Console.WriteLine() will forward there, yes, but you can't specify log levels that way.

iOS (and other Apple platforms) generally supports this (for example, debug logging), but I couldn't find any facility in Xamarin to map those low-level functions. (Here's a thread about it.)

chucker avatar Mar 08 '20 11:03 chucker

Just wanted to clarify for posterity that Unified Logging on Apple platforms isn’t calling NSLog.

allenhumphreys avatar Jun 27 '20 14:06 allenhumphreys

@allenhumphreys I made a sink that calls Apple’s APIs. If someone is interested, I’ll make the repo public.

chucker avatar Jun 28 '20 16:06 chucker

@chucker : Does the unified-logging sink works with .NET core ? And yes, please make it public. kind regards, rwelz

rwelz avatar Oct 16 '20 08:10 rwelz

Does the unified-logging sink works with .NET core ?

I don't believe it's possible yet to target Xamarin stuff from .NET Core?

chucker avatar Nov 01 '20 14:11 chucker

@allenhumphreys I made a sink that calls Apple’s APIs. If someone is interested, I’ll make the repo public.

@chucker I just came across this - would you be interested in contributing that sink into this repo so there's one place for all xamarin sinks

nickrandolph avatar Jul 15 '22 02:07 nickrandolph

Given Xamarin has been EOL'd, and we're at two years since the last commit in this repo, it's probably best at this point to organize new mobile sinks around their respective APIs in new repositories.

I'm running through closing stale issues, and expecting we'll end up archiving this repo in the not-too-distant future, but if there's some anticipated way forward I'm unaware of please give me a shout :)

nblumhardt avatar Jun 06 '24 10:06 nblumhardt

Continuing discussion in https://github.com/serilog/serilog-sinks-xamarin/pull/32#issuecomment-2151964516

nblumhardt avatar Jun 06 '24 22:06 nblumhardt

would you be interested in contributing that sink into this repo

I’ll have to port it to modern .NET some day.

chucker avatar Jun 07 '24 07:06 chucker