Argon logger 
Argon logger is a simple console logging utility with options to enable/disable logs as per given environment configuration. Argon logger extends the existing console API, therefore any changes to existing console
object will reflect in argon logger too.
Installation
npm i argon-logger
How it works?
Argon logger is simple to use.
Without configuration
import Logger from 'argon-logger';
const logger = new Logger();
logger.log('Hello');
logger.warn('This is a warning');
logger.error('This is an error');
logger.debug('This is a debug message');
...
By default argon logger enables log statements for localhost URLs or URLs containing debug
as a search parameter. We can change this behavior by providing a configuration.
With configuration
const logger = new Logger({
allowedHostnames: ['google.com'],
allowedQueryStringParameters: ['debug=true'],
disable: false
});
logger.log('Hello');
logger.warn('This is a warning');
...
Disclaimer
Argon logger doesn't have any major releases yet. It means it has potential to break in few scenarios. We need your contribution to make it better. Please email at contactsachinsingh@gmail.com if you want to become a contributor.