Skip to main content
Deno 2 is finally here 🎉️
Learn more

Rubiks

deno module NPM Version

Rubiks is a 0 dependency extendable logging library for modern applications.

import { rubiks, warn, withDates } from "rubiks";

rubiks()
    .log("Rubiks can do normal logging")
    .log("Rubiks can also use custom levels, which allow changing the action", warn)
    .warn("It also has some included methods for simplicity")
    .use(withDates)
    .log("You can also use modifiers, that modify all logs of this instance");

you can also easily create your own levels…

import { rubiks } from "rubiks";

function customLevel(self, content) {
    console.log(`This is the content: ${content}`)
}

rubiks()
    .log("hello!", customLevel)

or your own modifiers…

import { rubiks } from "rubiks";

function customModifier(self) { 
    return (self, content) => {
        self.format += `${content} `
    }
}

rubiks()
    .use(customModifier)
    .log("testing")
    .error("more")