StackExchange / NetGain

A high performance websocket server library powering Stack Overflow.
MIT License
931 stars 141 forks source link

TcpHandler is spamming in Console.Write #5

Open deniszykov opened 8 years ago

deniszykov commented 8 years ago

It would be polite for the NetGain do not write logs directly to console.
For module with so many abstractions, it is strange that that logging is done through the console.

mgravell commented 8 years ago

That's fair. Will revisit. On 20 Mar 2016 8:40 a.m., "deniszykov" notifications@github.com wrote:

It would be polite for the NetGain do not write logs directly to console.

For module with so many abstractions, it is strange that that logging is done through the console.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/StackExchange/NetGain/issues/5

mleenhardt commented 7 years ago

Hey @mgravell, thanks for that awesome project! Has there been any progress on this? We're interested in using the lib but having hardcoded Console.Writeline isn't an option for us and we would ideally like to not fork the project just to fix this. #10 seems like a decent alternative while other .net core logging discussion are happening. Would you consider it meanwhile?

mgravell commented 7 years ago

Yes; I have some incomplete changes to push on this - I will look at the logging at the same time

mgravell commented 7 years ago

K, so I've uploaded https://www.nuget.org/packages/StackExchange.NetGain/1.0.39 which makes ErrorLog and Log available on the handler or service; they default to Console.Out or Console.Error to be equivalent, but you can either null them out or provide your own.

mleenhardt commented 7 years ago

Thank you! The updated package currently shows as unlisted and won't by picked up by a nuget update, just making sure that's intended. I'll manually download it for now. 😃

mgravell commented 7 years ago

Yes that was intended. I didn't have the energy to change the build server to get it marked as beta. I'm bad.

On Fri, 18 Nov 2016 17:55 Mathieu Leenhardt, notifications@github.com wrote:

Thank you! The updated package currently shows as unlisted and won't by picked up by a nuget update, just making sure that's intended. I'll manually download it for now. 😃

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/StackExchange/NetGain/issues/5#issuecomment-261597064, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsCCxych0-V7IojEI7cvu0WdzDhpSks5q_eaJgaJpZM4H0n4L .