1 | import { LogEntry } from '../logger.js';
|
2 | import { Transform } from '../transform.js';
|
3 | import * as ansi from '@bevry/ansi';
|
4 |
|
5 | interface LevelsToColorsMap {
|
6 | [logLevelNumber: string]: ansi.ANSIApplier;
|
7 | }
|
8 |
|
9 | export interface HumanOptions {
|
10 |
|
11 | color?: boolean;
|
12 |
|
13 | colors?: LevelsToColorsMap;
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare class Human extends Transform {
|
28 |
|
29 | color: boolean;
|
30 |
|
31 | colors: LevelsToColorsMap;
|
32 |
|
33 | constructor(opts?: HumanOptions);
|
34 | /** Get the color for the log level */
|
35 | getColor(levelNumber: number): ansi.ANSIApplier | false;
|
36 | /** Pad the left of some content if need be with the specified padding to make the content reach a certain size */
|
37 | padLeft(padding: string, size: number, content: string | number): string;
|
38 | /** Convert logger entry arguments into a human readable string */
|
39 | formatArguments(args: any[]): string;
|
40 | /** Convert a datetime into a human readable format */
|
41 | formatDate(datetime: Date | number | string): string;
|
42 | /** Convert a logger entry into a human readable format */
|
43 | format(entry: LogEntry): string;
|
44 | }
|
45 | export default Human;
|
46 | //# sourceMappingURL=human.d.ts.map |
\ | No newline at end of file |