Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
23 lines
631 B
Plaintext
23 lines
631 B
Plaintext
import { ILayout, Level, ConsoleAppender, LogEvent } from 'base-log-factory';
|
|
export interface ColorfulAppenderOptions {
|
|
layout?: ILayout;
|
|
colors?: Record<Level, string>;
|
|
}
|
|
/**
|
|
* Console appender (控制台输出)
|
|
*/
|
|
export declare class ColorfulAppender extends ConsoleAppender {
|
|
name: string;
|
|
colors: Record<Level, string>;
|
|
/**
|
|
* Constructor (构造函数)
|
|
*/
|
|
constructor(opts?: ColorfulAppenderOptions);
|
|
/**
|
|
* Write log (写入日志)
|
|
* @param event Log event (日志事件)
|
|
*/
|
|
write(event: LogEvent): void;
|
|
protected color(str: string, event: LogEvent): string;
|
|
}
|