🐨 Elegant Console Logger for Node.js and Browser
singleThick
(#201)consola.box
(#193)consola/utils
subpath export (#199)Thank you everyone for trusting and using Consola 🐨 ❤️
This is the first stable version for consola v3, with a new codebase, typescript rewrite, fewer dependencies (no more chalk and dayjs bundled), first-class ESM support, new consola.prompt()
and lots of other improvements!
Consola v3 tries to be backward compatible as much as possible for the main interface. For a proper upgrade, switch to named exports.
// ESM
import { consola, createConsola } from "consola";
// CommonJS
const { consola, createConsola } = require("consola");
logLevel
to 1
in test environments (#134)createConsola
and named exports (ef6e5e5)consola.prompt
util (#170)consola.fail
log level (#153)formatOptions
and other options to reporters (d77286a)consola.trace
(#151).raw
to mocked functions (987dadc)CONSOLA_LEVEL
to the defaults
(#129)global
to globalThis
(bd03098)globalThis
usage (4e7b909)json
and winston
reporters (5af0e99)consola.options
without duplication (2d31ef4)_lastLog
object (cabd04f)async
option (edd1bb9)LogTypeLiteral
and logtype
types to LogType
(da1bc73)start()
color and icon (5a01d53)Object.assign
(c03268a)consola.fail
log level (#153)formatOptions
and other options to reporters (d77286a)consola.trace
(#151)CONSOLA_LEVEL
to the defaults
(#129)json
and winston
reporters (5af0e99)consola.options
without duplication (2d31ef4)_lastLog
object (cabd04f)async
option (edd1bb9)LogTypeLiteral
and logtype
types to LogType
(da1bc73)index.node.ts
for main build (b92d23b)dist/index.*
for bw compatibility (98e300f)Object.assign
(c03268a)