UNPKG

@bitblit/ratchet-common

Version:

Common tools for general use

14 lines 520 B
import { StringRatchet } from '../lang/string-ratchet.js'; export class ClassicSingleLineLogMessageFormatter { formatMessage(msg, meta) { let tmp = null; if (msg) { tmp = ''; tmp += meta?.options?.trace ? meta.options.trace + ' ' : ''; tmp += '[' + msg.lvl + '] '; tmp += StringRatchet.format(msg?.messageSource ?? '', ...(msg.subsVars || [])); } return tmp; } } //# sourceMappingURL=classic-single-line-log-message-formatter.js.map