@logmanager/core
v1.0.1
Published
Core Library of logmanager, a logging library that aims to unify multiple logging libraries and makes it possible to use them together
Downloads
6
Maintainers
Readme
@logmanager/core
Core Library of logmanager, a logging library that aims to unify multiple logging libraries and makes it possible to use them together
Installation
npm i @logmanager/core @logmanager/package-console
Quick Start
import { LogManager, LogLevel } from "@logmanager/core"
import { ConsoleLogger } from "@logmanager/package-console"
const logManager = new LogManager(new ConsoleLogger(), LogLevel.VERBOSE)
const someWeirdComponent = logManager.component("some weird component")
someWeirdComponent.fatal("This is a fatal log.")
someWeirdComponent.error("This is a error log.")
someWeirdComponent.warning("This is a warn log.")
someWeirdComponent.info("This is a info log.")
someWeirdComponent.debug("This is a debug log.")
someWeirdComponent.verbose("This is a verbose log.")
// Logs Messages in the format "%symbol% [%type%] {%component%} >> %message%", for example
// 📢 [fatal] {some weird component} >> This is a fatal log.