Skip to content
Permalink
Browse files

[DDW-656] Log Daedalus state snapshot

  • Loading branch information...
DeeJayElly committed Jul 12, 2019
1 parent 4f10301 commit 565a4ded82ead128527715e6f984ddb261b6ce5b
Showing with 42 additions and 16 deletions.
  1. +37 −11 source/common/types/logging.types.js
  2. +5 −5 source/main/utils/setupLogging.js
@@ -50,16 +50,42 @@ export type LogSystemInfoParams = {
};

export type LogStateSnapshotParams = {
frontendVersion: string,
backendVersion: string,
network: string,
build: string,
installerVersion: string,
os: string,
networkLocale: string,
product: string,
supportLanguage: string,
productVersion: string,
startTime: string,
availableDiskSpace: string,
cardanoAPIPort: number,
cardanoNetwork: string,
cardanoNodeState: string,
cardanoProcessID: number,
cardanoVersion: string,
cpu: string,
current: string,
currentLocale: string,
daedalusVersion: string,
daedalusMainProcessID: string,
daedalusProcessID: string,
daedalusStateDirectoryPath: string,
isConnected: boolean,
isDev: boolean,
isForceCheckingNodeTime: boolean,
isInSafeMode: boolean,
isMainnet: boolean,
isNodeInSync: boolean,
isNodeResponding: boolean,
isNodeSubscribed: boolean,
isNodeSyncing: boolean,
isNodeTimeCorrect: boolean,
isStaging: boolean,
isSynced: boolean,
isSystemTimeCorrect: boolean,
isSystemTimeIgnored: boolean,
isTestnet: boolean,
latestLocalBlockTimestamp: number,
latestNetworkBlockTimestamp: number,
localBlockHeight: number,
localTimeDifference: ?number,
networkBlockHeight: number,
platform: string,
platformVersion: string,
ram: string,
startTime: string,
syncPercentage: number,
}
@@ -99,17 +99,17 @@ export const logSystemInfo = (props: LogSystemInfoParams): MessageBody => {
export const logStateSnapshot = (props: LogStateSnapshotParams): MessageBody => {
const { current, ...data } = props;
const {
frontendVersion,
backendVersion,
network,
daedalusVersion,
cardanoVersion,
cardanoNetwork,
os,
startTime: at,
} = data;
const env = `${network}:${os}:${backendVersion}:${frontendVersion}`;
const env = `${cardanoNetwork}:${os}:${cardanoVersion}:${daedalusVersion}`;
const messageBodyParams: ConstructMessageBodyParams = {
at,
env,
ns: ['daedalus', `v${frontendVersion}`, `*${current}*`],
ns: ['daedalus', `v${daedalusVersion}`, `*${current}*`],
data,
msg: 'Updating State-snapshot.json file',
pid: '',

0 comments on commit 565a4de

Please sign in to comment.
You can’t perform that action at this time.