mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[dev/cli] stop trimming log lines from the server (#87199)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
e9b43cdd3f
commit
e8ecbc77a9
3 changed files with 8 additions and 8 deletions
|
@ -25,7 +25,7 @@ export interface Log {
|
|||
good(label: string, ...args: any[]): void;
|
||||
warn(label: string, ...args: any[]): void;
|
||||
bad(label: string, ...args: any[]): void;
|
||||
write(label: string, ...args: any[]): void;
|
||||
write(...args: any[]): void;
|
||||
}
|
||||
|
||||
export class CliLog implements Log {
|
||||
|
@ -58,9 +58,9 @@ export class CliLog implements Log {
|
|||
console.log(Chalk.white.bgRed(` ${label.trim()} `), ...args);
|
||||
}
|
||||
|
||||
write(label: string, ...args: any[]) {
|
||||
write(...args: any[]) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(` ${label.trim()} `, ...args);
|
||||
console.log(...args);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,10 +88,10 @@ export class TestLog implements Log {
|
|||
});
|
||||
}
|
||||
|
||||
write(label: string, ...args: any[]) {
|
||||
write(...args: any[]) {
|
||||
this.messages.push({
|
||||
type: 'write',
|
||||
args: [label, ...args],
|
||||
args,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,8 +191,8 @@ it('is ready when optimizer phase is success or issue and logs in familiar forma
|
|||
const lines = await linesPromise;
|
||||
expect(lines).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"[2mnp bld[22m log [timestamp] [[36msuccess[39m][[95m@kbn/optimizer[39m] 0 bundles compiled successfully after 0 sec",
|
||||
"[2mnp bld[22m log [timestamp] [error][[95m@kbn/optimizer[39m] webpack compile errors",
|
||||
" [2mnp bld[22m log [timestamp] [[36msuccess[39m][[95m@kbn/optimizer[39m] 0 bundles compiled successfully after 0 sec",
|
||||
" [2mnp bld[22m log [timestamp] [error][[95m@kbn/optimizer[39m] webpack compile errors",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -105,7 +105,7 @@ export class Optimizer {
|
|||
|
||||
ToolingLogTextWriter.write(
|
||||
options.writeLogTo ?? process.stdout,
|
||||
`${dim} log [${time()}] [${level(msg.type)}][${name}] `,
|
||||
` ${dim} log [${time()}] [${level(msg.type)}][${name}] `,
|
||||
msg
|
||||
);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue