Prefix: Viewing Application Logs

Prefix supports viewing logs from log4net or NLog in your profiling traces. To enable viewing your logs, you need to add the Stackify nuget packages for the logging appenders and ensure they are properly configured. When prompted for an ApiKey, leave it blank. You do not need a Stackify account.

 

 

NLog (view docs)

PM>Install-Package StackifyLib.NLog

log4net (view docs)

PM> Install-Package StackifyLib.log4net

Serilog (GitHub)

Install-Package Serilog.Sinks.Stackify

 

Viewing logs in Prefix only

Install the proper nuget packages and leave the Stackify.ApiKey blank. The Retrace profiler requires the nuget package so it can properly identify and pick up the log messages.

Viewing logs in Prefix and Retrace both

If you are also a Retrace customer for our error & log product, you can control if you want to send logs from your development machine to Stackify or not. Leaving the Stackify.ApiKey blank would disable sending the logs to Stackify.

When you deploy your app you will want to use a config transform to add the Stackify.ApiKey back in the same way you would other environmental settings, like database connection strings. You can optionally set the Stackify.ApiKey in code by setting StackifyLib.Logger.GlobalApiKey.