serilog / serilog-sinks-xamarin

A Serilog sink that writes events to Xamarin mobile targets
Apache License 2.0
55 stars 18 forks source link

Support Apple Unified Logging #14

Closed allenhumphreys closed 4 months ago

allenhumphreys commented 5 years ago

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

FinHorsley commented 5 years ago

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()

nberardi commented 5 years ago

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 notifications@github.com 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.

FinHorsley commented 5 years ago

Great 🙂

chucker commented 4 years ago

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.)

allenhumphreys commented 4 years ago

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

chucker commented 4 years ago

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

rwelz commented 4 years ago

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

chucker commented 3 years ago

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

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

nickrandolph commented 2 years ago

@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

nblumhardt commented 4 months ago

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 commented 4 months ago

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

chucker commented 4 months ago

would you be interested in contributing that sink into this repo

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