[go: up one dir, main page]

Skip to content

Logger name is being modified if error object has hostname property

Antora's CLI will catch an unhandled error and log it at the FATAL level. If the --stacktrace option is specified, the error object will be included. Pino has added a feature that if the error object contains the hostname property, its value will be appended to the logger name, effectively modifying the logger name. This is an undesirable feature and should be suppressed.

One reason it's undesirable is because it uses an incorrect preposition. If an Antora software component or extension is reaching out to a remote host, the logger name will read antora on docs.example.org. This is misleading. Antora is not running on the hostname, it's trying to contact it.

The other reason it's undesirable is that it causes logger names to be dynamic and thus harder to match. Antora should not allow the error object to modify the name of the logger. It should be static. If the hostname is relevant to the error, then it should be included in the message or details.

Edited by Dan Allen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information