Easier way to enable verbose log level
Environment
Consola: 3.2.3 Node: 21.6.1
Reproduction
call the .verbose("message") method of the logger
Describe the bug
No matter the log level I give to the ConsolaInstance logs called in from .verbose never reach my reporters. This method should either be removed if it's not intended to ever work or be fixed to pass the contents to reporters when the logger's level is set to 999 as expected.
Additional context
No response
Logs
No response
Set level to LogLevels.verbose to enable verbose logs.
import { consola, LogLevels } from "consola"
consola.level = LogLevels.verbose
// or
createConsola({
level: LogLevels.verbose,
reporters: [ ... ]
})
(And the level for verbose is not 999, it's Number.POSITIVE_INFINITY)
https://github.com/unjs/consola/blob/main/src/constants.ts#L37
@kricsleo i think we can set it to something like 10 to make setup easier. Feel free to drop a PR 👍🏼
The README.md states that +999 is for verbose logs, which is not true, it's Number.POSITIVE_INFINITY (as stated before above).
Is there a way to enable verbose logging using the CONSOLA_LEVEL env var right now? Passing CONSOLA_LEVEL=Infinity causes consola.level to become NaN. Setting it to 1000 has no effect.