/logger

Small TypeScript logger.

Primary LanguageTypeScriptBoost Software License 1.0BSL-1.0

logger

Coverage Status npm dependents Downloads CI

Just a small logger class using chalk.

Based on the Logger class from SquadJS

Installation

You can install logger using the following command

npm install @skyraptor/logger

Usage

import Logger from '@skyraptor/logger'
import chalk from 'chalk'

// Determine how much to show of a module
Logger.setVerboseness('MyModule', 4)

// Set color for a module using ChalkInstance or string
Logger.setColor('MyModule', chalk.blue)

// Log message to console with verbosity 3
Logger.verbose('MyModule', 3, 'Hello World!')

Thanks

  • Thomas for creating SquadJS and the Logger class