Skip to content

rt0-logger 2.1.5

Install from the command line:
Learn more about npm packages
$ npm install @raythurnvoid/rt0-logger@2.1.5
Install via package.json:
"@raythurnvoid/rt0-logger": "2.1.5"

About this version

  1. Create a log.ts file:
import { buildLogger } from "@raythurnevoid/rt0-logger/browser.js";
import type { Config } from "@raythurnevoid/rt0-logger/types.js";

const config: Config = {
	logLevel: "debug",
};

export const Log = buildLogger(() => config);

export type Log = InstanceType<typeof Log>;
  1. Use your new logger:
import { Log } from "./log.js";

const log = new Log("path/to/module.ts");

log.info(`Hello World}`);
log.i(`Hello World}`);

Results:

[path/to/module.ts] [INFO] Hello World
[path/to/module.ts] [INFO] Hello World

Check the GitHub homepage for the complete documentation.

Details


Assets

  • rt0-logger-2.1.5.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0