toddmeinershagen / NLog.SignalR

Custom NLog target for sending logs to a SignalR hub. This release is based on SignalR 2.0.
Apache License 2.0
31 stars 9 forks source link

Introduced NLog.AspNetCore.SignalR #20

Closed snakefoot closed 1 year ago

snakefoot commented 2 years ago

Added sibling-package to NLog.SignalR, that depends on Microsoft.AspNetCore.SignalR.Client (no longer depends on newtonsoft json or jquery)

snakefoot commented 2 years ago

Could also consider creating a whole new repository

snakefoot commented 2 years ago

@toddmeinershagen Any preferred direction from this pull-request?

toddmeinershagen commented 1 year ago

@snakefoot - when I download your fork, the sample application doesn't run and the tests are not working. Do they work on your local?

snakefoot commented 1 year ago

They worked 1 year ago, but seems that my Visual Studio 2022 Test-discovery not working for the old NLog.SignalR.IntegrationTests-project. But the new NLog.AspNetCore.SignalR.Tests-project can run, but there is a change in the connection-recovery-state, so after StartAsync-completion then connection-state remains "Connecting" instead of "Connected".

See very limited changes in the old code with this pull-request (only added more logging, and changed StartExistingConnection not to throw). Do the unit-test and sample project work for you in the master-branch ?

snakefoot commented 1 year ago

@toddmeinershagen Have updated dependencies, and now unit-test and example project is working on VS2022.

toddmeinershagen commented 1 year ago

I have updated things to .net 4.8 on my local. What are your thoughts on upgrading? I think that anything less than 4.6.2 is not even secure or supported at this point.

snakefoot commented 1 year ago

The net45 is only an target API, and the actual target-runtime installed on operating system is usually updated and secure (The target-runtime supports all net-API-versions).

At some point there will be an issue with net45-API not being supported by the latest build tools (Just like net40-API is not supported by the build-tools, but target-runtime will still run it). I think net461 or net462 is good for the nuget package. You can update the example projects to NET48 if you like.