Skip to content

Commit 45283d2

Browse files
authored
Merge pull request #35588 from rh-max/srvls-nodejs-log-levels
SRVOCF-346: Add a section on fine-tuning log levels in Node.js functions
2 parents d98cb84 + 0db4300 commit 45283d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/serverless-nodejs-context-object-reference.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Module included in the following assemblies
2-
//
3-
// * /serverless/functions/serverless-functions-reference-guide.adoc
4-
51
[id="serverless-nodejs-context-object-reference_{context}"]
62
= Node.js context object reference
73

@@ -34,6 +30,8 @@ $ curl http://example.com
3430
{"level":30,"time":1604511655265,"pid":3430203,"hostname":"localhost.localdomain","reqId":1,"msg":"Processing customer"}
3531
----
3632

33+
You can change the log level to one of `fatal`, `error`, `warn`, `info`, `debug`, `trace`, or `silent`. To do that, change the value of `logLevel` by assigning one of these values to the environment variable `FUNC_LOG_LEVEL` using the `config` command.
34+
3735
[id="serverless-nodejs-context-object-reference-query_{context}"]
3836
== query
3937

0 commit comments

Comments
 (0)