modernlog
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

modernlog

Usage

const logger = require("modernlog/patch");

console.log("e"); // modern

OR, if you don't want to patch the console object

const logger = require("modernlog");

logger.log("e"); // modern

OR, if you want to patch the console object but revert the changes

const logger = require("modernlog/patch");

console.log("e"); // modern

logger.unpatch();

console.log("e"); // normal

logger.patch();

console.log("e"); // modern

Options

Applies to logger.* and console.* if patched.

logger.log("e"); // modern
logger.options.filename = true;
logger.log("e"); // modern with caller file name
logger.options.extraSpaces = 1;
logger.log("e"); // modern with one newline at the end
logger.options.filename = true;
logger.options.extraSpaces = 1337420;

logger.options.ignoreOptions = true;
logger.log("e"); // modern

/modernlog/

    Package Sidebar

    Install

    npm i modernlog

    Weekly Downloads

    15

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    9.59 kB

    Total Files

    11

    Last publish

    Collaborators

    • jeanouina