Skip to content

Commit 531ad5d

Browse files
committed
Merge branch 'master' into dev
2 parents c8eb4e3 + 7a784c3 commit 531ad5d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ This is a collection of support libraries for node.js applications running on Cl
99
For details on the concepts and log formats, please look at the sibling project for [java logging support](https://github.com/SAP/cf-java-logging-support).
1010

1111
#### Version 2.0 introduced logging without Winston and changed custom fields to be parsed and reported as strings regardless of original type.
12-
#### Version 3.0 introduced dynamic log levels, sensitive data reduction and a redesigned field configuration system
12+
#### Version 3.0 introduced dynamic log level thresholds, sensitive data reduction and a redesigned field configuration system
1313
#### Version 4.0 changed winston transport api
1414

1515
## Features
1616

1717
* Network logging (http requests) for CloudFoundry
1818
* Custom message logging
1919
* Logging levels
20-
* Dynamic logging level (per request)
20+
* Dynamic logging level threshold (per request)
2121
* Extendable field configuration
2222
* Sensitive data reduction
2323
* Can be bound to [Winston](https://github.com/winstonjs/winston) as transport
@@ -166,16 +166,16 @@ In order to activate normal logging for all or some of these fields, you have to
166166

167167
This behavior matches with the corresponding mechanism in the [CF Java Logging Support](https://github.com/SAP/cf-java-logging-support/wiki/Overview#logging-sensitive-user-data) library.
168168

169-
### Dynamic log levels
170-
Sometimes it is useful to change the logging level for a specific request. This can be achieved by dynamic log levels set by a special header field or directly inside the corresponding request handler.
169+
### Dynamic logging level threshold
170+
Sometimes it is useful to change the logging level threshold for a specific request. This can be achieved using a special header field or setting directly within the corresponding request handler. Changing the logging level threshold only affects the presence of logs but not their individual logging levels.
171171

172-
#### Change log level via header field
173-
You can change the log level for a specific request by providing a JSON Web Token ([JWT](https://de.wikipedia.org/wiki/JSON_Web_Token)) via the request header. This way it is not necessary to redeploy your app for every log level change.
172+
#### Change logging level threshold via header field
173+
You can change the logging level threshold for a specific request by providing a JSON Web Token ([JWT](https://de.wikipedia.org/wiki/JSON_Web_Token)) via the request header. This way it is not necessary to redeploy your app for every logging level change.
174174

175175
##### 1 Creating a JWT
176-
JWTs are signed claims, which consists of a header, a payload and a signature. You can create JWTs by using the [TokenCreator](https://github.com/SAP/cf-nodejs-logging-support/tree/master/tools/token-creator) from the tools folder.
176+
JWTs are signed claims, which consist of a header, a payload and a signature. You can create JWTs by using the [TokenCreator](https://github.com/SAP/cf-nodejs-logging-support/tree/master/tools/token-creator) from the tools folder.
177177

178-
Basically, JWTs are signed with RSA or HMAC signing algorithms. But we decided to support RDA algorithms (RS256, RS384 and RS512) only. In contrast to HMAC algorithms (HS256, HS384 and HS512), RSA algorithms are asymmetric and therefore require key pairs (public and private key).
178+
Basically, JWTs are signed using RSA or HMAC signing algorithms. But we decided to support RSA algorithms (RS256, RS384 and RS512) only. In contrast to HMAC algorithms (HS256, HS384 and HS512), RSA algorithms are asymmetric and therefore require key pairs (public and private key).
179179

180180
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:
181181
```
@@ -198,16 +198,16 @@ DYN_LOG_LEVEL_KEY: <your public key>
198198
Redeploy your app after setting up the environment variable.
199199

200200
##### 3 Attaching JWTs to requests
201-
Provide the created JWTs via a header field named 'SAP-LOG-LEVEL'. The logging level will be set to the provided level for the request (and also corresponding custom log messages).
201+
Provide the created JWTs via a header field named 'SAP-LOG-LEVEL'. The logging level threshold will be set to the provided level for the request (and also corresponding custom log messages).
202202

203-
Note: If the provided JWT cannot be verified, is expired or contains an invalid logging level, the library ignores it and uses the global logging level.
203+
Note: If the provided JWT cannot be verified, is expired or contains an invalid logging level, the library ignores it and uses the global logging level threshold.
204204

205-
If you want to use another header name for the JWT, you can specify it via an enviroment variable:
205+
If you want to use another header name for the JWT, you can specify it using an enviroment variable:
206206
```
207207
DYN_LOG_HEADER: MY-HEADER-FIELD
208208
```
209209

210-
#### Change log level within request handler
210+
#### Change logging level threshold within request handlers
211211
You can also change the log level for all requests of a specific request handler by calling:
212212
```js
213213
req.setDynamicLoggingLevel("verbose");

0 commit comments

Comments
 (0)