1.0.2 • Published 5 years ago

promise-logger v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Promise-Logger

A Nodejs logger made with promises.

Still very bare bones. Will be updating with expected features of a logger.

Usage examples

() => {
	const  Logger  =  require('promise-logger').Logger;
	const  logger  =  new  Logger();
	console.log(0)
	logger.log('This will log');
	console.log(1)
	logger.log(' after all syncronus');
	console.log(2)
	logger.log(' javascript');
	console.log(3)
	logger.end();
	console.log(4)
}
// 1
// 2
// 3
// 4
// This will log after all syncronus javascript
http.createServer( (req, res) =>{
    const logger = new Logger();
    logger.log(req.connection.remoteAddress);
    logger.log(req.method);
    logger.log(req.url);
    logger.end('\t')
}     
// IP	Method	url
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago