unjs/consola

Easier way to enable verbose log level

TurtleKwitty opened this issue ยท 2 comments

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

pi0 commented

@kricsleo i think we can set it to something like 10 to make setup easier. Feel free to drop a PR ๐Ÿ‘๐Ÿผ