@ptenn/logger
v0.2.0
Published
## Installation
Downloads
1
Readme
logger
Installation
Run yarn add @ptenn/logger
or npm add @ptenn/logger
.
Usage
To set up a logger, use the following as a guideline:
import { Logger, LogLevel } from '@fundify/logger';
import config from '../../config';
function shouldLog(level: LogLevel): boolean {
if (level === 'debug' && config.environment === 'production') {
return false;
}
return true;
}
export const logger = new Logger({
environment: config.environment,
style: config.logger.style,
shouldLog
});
Publishing
Publish by running npm publish