UNPKG

simpl-loggar

Version:

Simple node.js logger

23 lines (22 loc) 770 B
import * as enums from '../enums/index.js'; import type { LoggerOptions } from 'winston'; export default class LoggerUtils { /** * Save log in files. * @param message Message to save. * @param type Category of log. * @param prefix Prefix for logs location. * @param config Optional winston config. * @param config.winston */ static saveLog(message: unknown, type: enums.ELogTypes, prefix: string | null, config?: { winston?: LoggerOptions; }): void; /** * Stringify log. * @param message Stringify message to save it. * @param styleJson Boolean marking if json should be styled or not. * @returns Stringified log. */ static toString(message: unknown, styleJson: boolean): string; }