0.1.6 • Published 2 years ago

lowtide v0.1.6

Weekly downloads
50
License
MIT
Repository
github
Last release
2 years ago

Lowtide

NodeJS file logger.

Features:

  • Extremely minimal and fast, no dependencies
  • Logs to file asynchronously
  • Supports formatted logging of arrays, objects and dates
  • Can be used to log to file with console.log and console.error in production

Install

npm i lowtide

Usage

// Require
const lowtide = require('lowtide')

// Init logger on this file
const log = lowtide('file.log')

// Log string
log('Something happened!')

// Log object
log({ name: 'something' })

// Log console log and error to file
if (process.env.NODE_ENV == 'production') {
  console.log = lowtide('log/app.log')
  console.error = lowtide('log/err.log')
}

MIT Licensed. Enjoy!

0.1.6

2 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago