@cmtlyt/logger
Version:
21 lines (20 loc) • 745 B
TypeScript
import type { NodeConsoleAdapterCtx } from './types';
/**
* 解析格式字符串并替换占位符
* @param formatStr 格式字符串
* @param type 日志类型
* @param label 标签
* @param messages 消息数组
* @param ctx 适配器上下文
* @returns 格式化后的字符串
*/
export declare function parseFormatString(formatStr: string, type: string, label: string, messages: any[], ctx: NodeConsoleAdapterCtx): string;
/**
* 格式化消息
* @param type 日志类型
* @param label 标签
* @param messages 消息数组
* @param ctx 适配器上下文
* @returns 格式化后的消息字符串
*/
export declare function formatMessage(type: string, label: string, messages: any[], ctx: NodeConsoleAdapterCtx): string;