Socket
Book a DemoInstallSign in
Socket

dy-logger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dy-logger

[https://github.com/hoangthanh751996/dy-logger.git](https://github.com/hoangthanh751996/dy-logger.git)

1.1.1
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dy-logger

https://github.com/hoangthanh751996/dy-logger.git

SUMMARY

A simple logging library for NodeJS

USAGE

A logger has 5 different levels of logging in a specific order:

'fatal', 'error', 'warn', 'info', 'debug'

Each of these log levels has its own method on the logging instance. You can set the maximum log level on a logger at runtime.

By default, a logger writes to STDOUT, but given a writeable file path, it will log directly to a file.

Instantiation:

npm install dy-logger
const logger = require('dy-logger');

Logging:

Any of the logging methods take n arguments, which are each joined by ' ' (similar to console.log()). If an argument is not a string, it is string-ified by sys.inspect()

logger.info('loading an array', [1,2,3], 'now!');
//=> info [Sat Jun 12 2010 01:12:05 GMT-0400 (EDT)]  loading an array [ 1, 2, 3, [length]: 3 ] now!

COMMENTS/ISSUES:

F-f-fork it, baby.

LICENSE

MIT, see the source.

FAQs

Package last updated on 07 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.