Configure Method
Generates JavaScript code to configure JavaScript loggers and appenders.
Definition
public static string Configure(string requestId = null)
Parameters
requestId | Request id to include in log messages sent by JSNLog to the server. See remarks. |
---|
Return Value
Script blocks that configure your JavaScript loggers and appenders.
Remarks
If you use ASP.NET Core, do not use this method. Instead, use the jl-javascript-logger-definitions tag helper.
As part of the
installation
It translates the server side configuration to JavaScript code that configures the client side loggers and appenders (details).
requestId
JSNLog gets the request id of the request, or if it can't, generates its own unique id. It sends that with all log messages to the server so log messages belonging to the same request can be correlated (details).
If however you generate your own request ids and you want JSNLog to use that instead, pass in your request id.