@chatally/logger

0.0.4 • Public • Published

@chatally/logger

ChatAlly Logger Facade

Simple logger facade that can be used in libraries to use any logging framework without introducing any dependencies.

The facade can be easily implemented with popular frameworks like Pino, Winston or log4js.

The main intrface of the facade is Logger, it supports typical log methods (debug, info, warn, error), logging of messages, format strings and data objects including errors, and creating named child loggers.

Getting started

Install the package

npm install @chatally/logger

Use the logger

// index.js
import { BaseLogger } from "@chatally/logger";

const log = BaseLogger.create({ name: "Test" });
log.debug("Not logged"); // not logged, because default level is info
log.info("Hello, world!");

Documentation

Find the full documentation at https://chatally.org/reference/core/logger/.

Readme

Keywords

none

Package Sidebar

Install

npm i @chatally/logger

Weekly Downloads

6

Version

0.0.4

License

MIT

Unpacked Size

15.6 kB

Total Files

14

Last publish

Collaborators

  • shackhacker-christian