cf-nodejs-logging-support
Advanced tools
Comparing version 5.1.0 to 5.1.1
{ | ||
"name": "cf-nodejs-logging-support", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "Logging tool for Cloud Foundry", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -100,3 +100,3 @@ # Node.js Logging Support for Cloud Foundry | ||
The library can be attached as middleware to log all incoming requests as follows: | ||
``` | ||
```js | ||
app.use(log.logNetwork); | ||
@@ -106,3 +106,3 @@ ``` | ||
When using a plain Node.js http server it is necessary to call the middleware method directly: | ||
``` | ||
```js | ||
http.createServer((req, res) => { | ||
@@ -223,3 +223,3 @@ log.logNetwork(req, res); | ||
The tool mentioned above takes a log level, creates a key pair and signs the resulting JWT with the private key. The payload of a JWT looks like this: | ||
``` | ||
```js | ||
{ | ||
@@ -282,3 +282,3 @@ "issuer": "<valid e-mail address>", | ||
As stated above the ```req.logger``` acts as context preserving object and provides context bound functions like ```info(...)```. In some cases you might want to create new context objects in order to create logs in context of other incoming data events (e.g. RabbitMQ). To do so you can use | ||
``` | ||
```js | ||
var ctx = log.createCorrelationObject(); | ||
@@ -285,0 +285,0 @@ ctx.logMessage(...); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89750
15