@jliocsar/tarsier
v0.0.7
Published
Yet another logging library for Node.js/Bun
Downloads
11
Readme
Yet another logging library for Node.js/Bun
W.I.P.
Tarsier is intended to be fast, highly customizable and just pretty.
If you need a more complex JSON logger, you should check out pino instead.
Tarsier was highly inspired by Signale, which still might be a better option for you.
Installing
npm i -D @jliocsar/tarsier
yarn add -D @jliocsar/tarsier
pnpm add -D @jliocsar/tarsier
bun add -D @jliocsar/tarsier
Usage
import { tarsier, Color } from "@jliocsar/tarsier";
const logger = tarsier({
types: {
santa: {
level: "info",
prefix: "🎅",
color: {
foreground: Color.Foreground.Red,
style: Color.Style.Bold,
},
},
grinch: {
level: "warn",
prefix: "🎄",
color: {
foreground: Color.Foreground.Green,
style: [Color.Style.Strikethrough, Color.Style.Italic],
},
},
},
});
logger.error(new Error("Something went wrong here!"));
logger.info("Santa is coming to town!");
logger.santa("Ho ho ho!");
logger.grinch("I hate Christmas!");