@nsilly/log

The nSilly Log package.

Stats

StarsIssuesVersionUpdatedCreatedSize
@nsilly/log
103.0.03 years ago3 years agoMinified + gzip package size for @nsilly/log in KB

Readme

NSilly Logger

Introduction

NSilly Logger based on winston. It's a Logger that can help you learn what's happening within your application, NSilly Log provides a logging service that can help you write your log message to file or transfer them to anywhere.

Configuration

Log Levels

NSilly Logger offers all of the log levels defined in the RFC 5424 specification: emergency, alert, critical, error, warning, notice, info, and debug.

So, imagine we log a message using the debug method:

import { Logger } from '@nsilly/log';

const logger = new Logger();
logger.debug('Message goes here', { data: 'context' });

Usage

import { Logger } from '@nsilly/log';

// If you want to log an error message
const logger = new Logger();
logger.error('Message goes here', { data: 'context' });
// or
logger.log('error', 'Message goes here', { data: 'context' });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.