UNPKG

@storm-software/config-tools

Version:

A package containing various utilities to support custom workspace configurations and environment management for Storm Software projects, including configuration file handling, environment variable management, and logging utilities.

36 lines (33 loc) 989 B
import { getLogFn, getStopwatch } from "./chunk-XHJNCOIU.js"; import { LogLevel } from "./chunk-RALMUN5C.js"; // src/logger/create-logger.ts import chalk from "chalk"; async function createLogger(config) { const writeFatal = getLogFn(LogLevel.FATAL, config, chalk); const writeError = getLogFn(LogLevel.ERROR, config, chalk); const writeWarning = getLogFn(LogLevel.WARN, config, chalk); const writeInfo = getLogFn(LogLevel.INFO, config, chalk); const writeSuccess = getLogFn(LogLevel.SUCCESS, config, chalk); const writeDebug = getLogFn(LogLevel.DEBUG, config, chalk); const writePerformance = getLogFn(LogLevel.PERFORMANCE, config, chalk); const writeTrace = getLogFn(LogLevel.TRACE, config, chalk); return { fatal: writeFatal, error: writeError, warning: writeWarning, info: writeInfo, success: writeSuccess, performance: writePerformance, debug: writeDebug, trace: writeTrace, getStopwatch }; } export { createLogger };