Add OS to record
Summary: OS will become useful later on, add it. Reviewed By: antonk52 Differential Revision: D47989161 fbshipit-source-id: 3615544051b163b77f87e5c52e6ac9cae8c478d4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d43173a8df
commit
2c24ec9f5d
@@ -79,6 +79,7 @@ export type DeviceLogLevel =
|
||||
export type ConnectionRecordEntry = {
|
||||
time: Date;
|
||||
type: 'warning' | 'info' | 'error';
|
||||
os: DeviceOS;
|
||||
device: string;
|
||||
app: string;
|
||||
message: string;
|
||||
|
||||
@@ -47,10 +47,12 @@ class Recorder {
|
||||
const device = clientQuery?.device ?? 'NONE';
|
||||
const app = clientQuery?.app ?? 'NONE';
|
||||
const medium = clientQuery?.medium ?? 'NONE';
|
||||
const os = clientQuery?.os ?? 'Browser';
|
||||
|
||||
const entry: CommandRecordEntry = {
|
||||
time: new Date(),
|
||||
type: payload.success ? 'info' : 'error',
|
||||
os,
|
||||
device,
|
||||
app,
|
||||
message: payload.cmd,
|
||||
@@ -78,6 +80,7 @@ class Recorder {
|
||||
const entry: ConnectionRecordEntry = {
|
||||
time: new Date(),
|
||||
type,
|
||||
os: clientQuery.os,
|
||||
device: clientQuery.device,
|
||||
app: clientQuery.app,
|
||||
message: args.join(' '),
|
||||
|
||||
Reference in New Issue
Block a user