snowflake-connector-net icon indicating copy to clipboard operation
snowflake-connector-net copied to clipboard

SNOW-189192: Use serilog instead of log4net

Open moravas opened this issue 5 years ago • 4 comments

Hi,

I would like to use serilog for logging instead of log4net in my project that also depends on snowflake-connector-net too. Is it possible to inject it? Maybe, is there an example code? Thank you

moravas avatar Sep 01 '20 19:09 moravas

If the Microsoft.Extensions.Logging interfaces were used there's plugins for both serilog and log4net and the implementer would be able to decide which logging mechanism they want to use.

RyanGrange avatar Oct 03 '20 17:10 RyanGrange

+1 Microsoft.Extensions.Logging is the way to go.

dazinator avatar Nov 19 '20 21:11 dazinator

@sfc-gh-hkapre - Just checking - has this been done? Looking at the project readme it still says log4net is used: https://github.com/snowflakedb/snowflake-connector-net#logging

dazinator avatar Jun 30 '22 09:06 dazinator

Yes. Please use Microsoft.Extensions.Logging so that you are consistent with all other modern .net libs and provide the flexibility for the consumer to choose their logging implementation of choice.

agilenut avatar Sep 01 '22 16:09 agilenut

looks duplicate of #204

sfc-gh-dszmolka avatar Jun 07 '23 12:06 sfc-gh-dszmolka