@nsilly/log

3.0.0 • Public • Published

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' });

Readme

Keywords

Package Sidebar

Install

npm i @nsilly/log

Weekly Downloads

25

Version

3.0.0

License

MIT

Unpacked Size

186 kB

Total Files

32

Last publish

Collaborators

  • lebaotrung
  • nightfury