@ladjs/logger
v0.1.0 transport api wrapper official ladjs lad-logger logger lass winston and 9 more...
@ladjs/logger
Logger for Lad
Table of Contents
- Install
- Usage
- Hide timestamps from console output
- Suppress logs
- Process name
- Contributors
- Trademark Notice
- License
Install
npm:
npm install @ladjs/logger
yarn:
yarn add @ladjs/logger
Usage
const Logger = require('@ladjs/logger');
const logger = new Logger();
logger.info('hello world');
// info: hello world
Hide timestamps from console output
const Logger = require('@ladjs/logger');
const logger = new Logger({ timestamp: false });
Suppress logs
This is useful when you want need logging turned on in certain circumstances.
For example when you're running tests you can set logger.config.silent = true
.
const Logger = require('@ladjs/logger');
const logger = new Logger({ silent: true });
logger.info('hello world');
Process name
In case you need to run multiple node processes together we recommend passing a processName to the logger.
const Logger = require('@ladjs/logger');
const logger = new Logger({ processName: 'web' });
logger.info('hello world');
// [web] info: hello world
Contributors
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com |
Alexis Tyler | https://wvvw.me/ |
Trademark Notice
Lad, Lass, and their respective logos are trademarks of Niftylettuce LLC. These trademarks may not be reproduced, distributed, transmitted, or otherwise used, except with the prior written permission of Niftylettuce LLC. If you are seeking permission to use these trademarks, then please contact us.