0.0.3-rfix • Published 7 years ago
log2file v0.0.3-rfix
log2file
This is a simple module to save logs for your NodeJS application!
What's new in 0.0.3?
- All functions are now chainable!
console.log('hello').warn('I am a warning!')
Custom colored console logs.
Usage:
console.custom('Custom colored message', 'magenta') // Outputs magenta colored message in the console
Valid colors:
black
red
yellow
blue
magenta
cyan
white
New option to use! See below.
How to use :
- Install module using
npm install log2file
- Require the module
var logToFile = require('log2file')
Initialize log2file
logToFile(options)
options
Object (required)logFile
String : Name of the log file, defaults tologfile.log
enableTime
Boolean : Sets whether the log should contain timelogToConsole
Boolean : Sets whether you want to show the log on console or just save it to the filebright
Boolean : Sets whether the console output should be bright or normal.
That's it! Use
console.log()
,console.warn()
andconsole.error()
like you do always.
MIT (c) Akash Rajendra
I was supposed to be studying for my exams, but no. I made this instead.
0.0.3-rfix
7 years ago
0.0.3
7 years ago
0.0.2-min-f2
7 years ago
0.0.2-mf1
7 years ago
0.0.2-mf0
7 years ago
0.0.2
7 years ago