mperdeck / jsnlog.js

Tiny JavaScript logging library, simple and well documented. Lots of options to filter logging data.
js.jsnlog.com
Other
130 stars 43 forks source link

RequestId not sent in header #41

Closed Payetus closed 7 years ago

Payetus commented 7 years ago

Adding the RequestId in the options:

JL().setOptions({
        "requestId": "35F7416D-86F1-47FA-A9EC-547FFF510086",
        "appenders": [this.appender]
    });

Does not send the requestId in the header of the http Request: image

mperdeck commented 7 years ago

This happens because you set the requestId on the nameless logger, instead of the library itself. Use JL.setOptions(.. instead of JL().setOptions(.... (no brackets after the JL)

See http://jsnlog.com/Documentation/JSNLogJs/JL/SetOptions