Skip to content

Commit 43d77af

Browse files
committed
Add verbosity_map and integer timestamp example
since rabbitmq/rabbitmq-server#3281 and rabbitmq/rabbitmq-server#3283 are merged. Example log output: {"v":7,"time":1629703633887530,"msg":"accepting AMQP connection <0.1321.0> (10.244.0.1:43532 -> 10.244.0.14:5672)","domain":"rabbitmq.connection","pid":"<0.1321.0>","gl":"<0.223.0>"}
1 parent 01ac388 commit 43d77af

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/examples/json-log/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pull Requests:
66
* [Switch from Lager to the new Erlang Logger API for logging #2861](https://github.com/rabbitmq/rabbitmq-server/pull/2861)
77
* [Logging: Add configuration variables to set various formats #2927](https://github.com/rabbitmq/rabbitmq-server/pull/2927)
88

9-
This example configures RabbitMQ to output JSON logs.
9+
This example (requiring RabbitMQ >= v3.9.3) configures RabbitMQ to output JSON logs.
1010

1111
You can deploy this example like this:
1212

docs/examples/json-log/rabbitmq.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ spec:
1616
log.console = true
1717
log.console.level = debug
1818
log.console.formatter = json
19-
log.console.formatter.json.field_map = level time msg domain file line pid
20-
log.console.formatter.time_format = rfc3339_T
19+
log.console.formatter.json.field_map = verbosity:v time msg domain file line pid level:-
20+
log.console.formatter.json.verbosity_map = debug:7 info:6 notice:5 warning:4 error:3 critical:2 alert:1 emergency:0
21+
log.console.formatter.time_format = epoch_usecs

0 commit comments

Comments
 (0)