jet / FsKafka

Minimal F# wrappers for Confluent.Kafka+librdkafka.redist 1.x
https://github.com/jet/dotnet-templates
Apache License 2.0
88 stars 17 forks source link

Wrapper introduce NLog dependency #2

Closed vchekan closed 6 years ago

vchekan commented 6 years ago

Description

CK does not have logger dependency. It has OnLog callback leaving it to the application to do wiring to concrete logger implementation. By introducing NLog dependency we may inconvenience people who use other loggers, log4net for example.

bartelink commented 6 years ago

Agree. (I use Serilog without any concrete logger to good effect (IMO) in Foldunk though, so would not be against a dependency on that). Happy to discuss pros/cons

eiriktsarpalis commented 6 years ago

Rationale for hardcoding NLog was to faithfully emulate kafunk behaviour. A proper logger agnostic library should expose observables like the underlying CK library does.

vchekan commented 6 years ago

How about calling existing [Consumer|Producer].OnLog? If application has been attached to this event, it will log with app-specific logger without wrapper being bound to the logger.

vchekan commented 6 years ago

Dropped NLog, onLog event is exposed and it is up to the app now, how to do logging.