Cmd failures should be displayed as errors too

Summary:
Styles are applied depending on entry type. This was an issue when we had 'cmd' as a type too.

So, let's simplify and keep type to denote info, warning, or errors.

Later on we can add a different tag if we want to differentiate between logs, command, others.

Reviewed By: passy

Differential Revision: D47912857

fbshipit-source-id: 213a0768a95f63cbd692ba96f6745ab740346a58
This commit is contained in:
Lorenzo Blasa
2023-07-31 05:16:54 -07:00
committed by Facebook GitHub Bot
parent f301de64f3
commit 143fe0e719
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ export type DeviceLogLevel =
export type ConnectionRecordEntry = { export type ConnectionRecordEntry = {
time: Date; time: Date;
type: 'cmd' | 'info' | 'error'; type: 'warning' | 'info' | 'error';
device: string; device: string;
app: string; app: string;
message: string; message: string;

View File

@@ -42,7 +42,7 @@ class Recorder {
const entry: CommandRecordEntry = { const entry: CommandRecordEntry = {
time: new Date(), time: new Date(),
type: 'cmd', type: payload.success ? 'info' : 'error',
device, device,
app, app,
message: payload.cmd, message: payload.cmd,