Logger not configured when Antora is installed globally
If Antora is installed globally using npm i -g
, the logger does not get configured. Not only does this cause the user's log settings to be ignored, Antora also prints the following message to stdout:
{"level":"warn","time":1636497403797,"msg":"logger not configured; creating logger with default settings"}
This happens is because both the CLI and the default site generator packages declare @antora/logger
as a dependency, and when these packages are installed globally, npm installs the logger under each package. As a result, when Antora is run from the global installation, Node.js loads both logging modules into the runtime. The CLI configures one instance and the default site generator uses the other (which is not configured). That's why the default site generator doesn't think the logger is configured.
Antora needs to be updated so that the CLI and the default site generator both use the same configured logger.