@benstack/logger
v0.1.0
Published
Simple and beautiful logger for JavaScript.
Downloads
15
Readme
Gorgeous isomorphic logging
A tiny, beautiful logger for all JavaScript runtimes.
Usage
pnpm i @benstack/logger
import {
createLogger,
Levels,
gradients
} from "@benstack/logger";
const logger = createLogger({
name: "LOGGER",
level: Levels.DEBUG,
color: gradients.purple
})
logger.debug("Debug message.")
logger.info("Info.")
logger.success("Same level as info.")
logger.warn("Uh oh.")
logger.error("I don't feel so good...")
logger.critical("I'm done for!")
logger.whisper("I'm quiet, but not that quiet.")
logger.speak("You can normally hear me.")
logger.shout("You can always hear me, even in production.")
License
Made with 💛
Published under MIT License.