Book Image

SignalR: Real-time Application Development - Second Edition

By : Einar Ingerbrigsten
Book Image

SignalR: Real-time Application Development - Second Edition

By: Einar Ingerbrigsten

Overview of this book

Table of Contents (19 chapters)
SignalR – Real-time Application Development Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
11
Hosting a Server Using Self-hosted OWIN
Index

Logging


Perhaps one of the most efficient debugging tools is logging; just get the text out that says what is going on in your system. Logging is the age-old technique of putting in code that writes out text to know what the system is doing. SignalR has a great support for this in all tiers.

Logging on the server side

You simply enable logging on the server by adding configuration to the application configuration file (App.config or Web.config) depending on the project type. In the configuration, you specify what events you are interested in seeing. You can also specify where you want it to log to, such as a text file, the Windows event log, or a custom log, using an implementation of TraceListener. The following table shows what trace sources are available and a description of what they represent:

Source

Messages

SignalR.SqlMessageBus

This scales out the setup, database operation, error, and timeout events

SignalR.ServiceBusMessageBus

This scales out provider topic creation and subscription...