Introducing NLog to SignalR

{  NLog+SignalR+Toastr==NLogToSignalR }

I have created a simple NLog target which uses SignalR (calling it NLogToSignalR) under the covers and delivers the log to either Hub or PersistentConnection and deliver nice messages using toastr.

Where does it fit?



If you use NLog as a logging tool, you can use this to deliver log messages to either same (or remote server) in real time in true toastr style

e.g. Information can be displayed as






How does this work?

You need follow these steps:

1. Put NLog.Targets.SignalR in the same folder as your App.Config/ Web.Config file

2. If you are going to be using Hub for SignalR, use following configuration


3. Deploy the Server NLog.Targets.SignalR.AspNetServer on local IIS.

4. Browse the website after deployment. (Ensure .NET Framework 4.5 is installed)

5. Start logging and watch the logs in real time.

The code is available for download from github.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s