UNPKG

1.02 kBTypeScriptView Raw
1export declare class TaskLogger {
2 private task;
3 private pid;
4 private buffer;
5 private insertTag;
6 /**
7 * Log output such that metadata are appended.
8 * Calling log(data) will not flush to console until you call flush()
9 *
10 * @constructor
11 * @param {object} task Task that is being reported.
12 * @param {number} pid PID of process running the task.
13 */
14 constructor(task: any, pid: number);
15 /**
16 * Log the header for the current task including information such as
17 * PID, browser name/version, task Id, specs being run.
18 *
19 * @private
20 */
21 private logHeader_();
22 /**
23 * Prints the contents of the buffer without clearing it.
24 */
25 peek(): void;
26 /**
27 * Flushes the buffer to stdout.
28 */
29 flush(): void;
30 /**
31 * Log the data in the argument such that metadata are appended.
32 * The data will be saved to a buffer until flush() is called.
33 *
34 * @param {string} data
35 */
36 log(data: string): void;
37}