@averagecryptonerd/kleurr
v2.0.0
Published
Kleurr (German for "color") is a lightweight console logging prettifier for Node.js, designed with simplicity and readability in mind. Make your logs pop with colors and custom types!
Downloads
27
Maintainers
Readme
Contents
Install
Through NPM:
npm install @averagecryptonerd/kleurrUsage
Default Loggers
Import Kleurr and start using any of the default loggers.
logwarnnoteerrorsuccessloadingimportantfataldebug
Basic Logging
const kleurr = require("@averagecryptonerd/kleurr");
kleurr.log("This is a standard log message.");
kleurr.info?.("This is an informational message.");
kleurr.warn("This is a warning!");
kleurr.note("Here's a helpful note.");
kleurr.error("Something went wrong!");
kleurr.success("Operation completed successfully!");
kleurr.fatal("This is a fatal error!");
kleurr.debug("Debugging: variable x = 42");
kleurr.important("This is important!");
kleurr.loading("Processing data…");Custom Logging
kleurr.registerType("custom", "\x1b[35m", "★ "); // Purple star
kleurr.custom("This is a custom log type!");You can create as many custom types as you like by specifying the background and text colors using ANSI escape codes.
