Skip to content

Commit aaee99e

Browse files
committed
Document federation-api logger.timestampPrefix config
1 parent 03b5a5b commit aaee99e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

content/api/federation.en.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ The default configuration can be found in `config/default.json`. The full refere
3636
"to": "The address to send the email to in case of an error",
3737
"from": "The address from which to send the email",
3838
"sendWarnings": "Boolean. Set to true to also send email in case of warning. Default: false",
39-
}
39+
},
40+
"timestampPrefix": "Boolean. Set to true to prefix the timestamp of the error message with the current date (in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ); see below"
4041
}
4142
"port": "Port number on which the server will listen for incoming connections. Default: 3333",
4243
"basePath": "The base path for the API endpoints",
@@ -51,6 +52,10 @@ The default configuration is merged with (and overridden by) environment-specifi
5152

5253
For development, in order to have a local configuration that overrides the existing config, it is recommended to create a `config/development.json` file.
5354

55+
### Logging
56+
57+
Setting `logger.timestampPrefix` to `false` can be useful when logs are being collected by a process manager (like PM2) that already adds timestamps to log entries. This avoids duplicate timestamps in the logs.
58+
5459
### `collections` configuration key
5560

5661
The `collections` configuration key is an array containing URLs or specific collections. Each item in the collections array can be either a URL pointing to a JSON file containing Collections objects, or a Collection object.

0 commit comments

Comments
 (0)