@beecode/msh-logger
v1.1.0
Published
[![Build Status](https://beecode.semaphoreci.com/badges/msh-logger/branches/main.svg?style=shields)](https://beecode.semaphoreci.com/projects/msh-logger) [![codecov](https://codecov.io/gh/beecode-rs/msh-logger/branch/main/graph/badge.svg?token=KDT5MPESF4)
Downloads
36
Readme
msh-logger
Micro-service helper: node environment
This project is intended to be used in typescript project to help with logging needs.
Install
npm i @beecode/msh-logger
Diagram
Logger Strategy
Define how and if we are logging.
NoLogger
This is the default logging strategy, meaning the logging is ignored.
ConsoleLogger
This is a simple logging strategy, it outputs all logs to console with a prefix of the log level (ERROR:
, WARN:
, INFO:
, DEBUG:
).
import MshNodeEnv, { logger } from '@beecode/msh-node-env'
const env = MshNodeEnv({ loggerStrategy: new logger.ConsoleLogger(logger.LogLevel.INFO) })