@ptenn/logger

Run yarn add @ptenn/logger or npm add @ptenn/logger.

Usage no npm install needed!

<script type="module">
  import ptennLogger from 'https://cdn.skypack.dev/@ptenn/logger';
</script>

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