Skip to content

Commit

Permalink
Cleanup logs in dev (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeichestakov authored Nov 1, 2023
1 parent 1b064e4 commit b3a2f7f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { app, Menu, BrowserWindow } from 'electron';
import { createWindow } from './createWindow';
import { appName, macAppIcon } from './constants';
import { appName, isProduction, macAppIcon } from './constants';
import { isMac } from './platform';
import { initSentry } from './sentry';
import { createApplicationMenu, createDockMenu } from './createMenu';
Expand All @@ -14,9 +14,12 @@ import log from 'electron-log/main';
log.initialize({ preload: true });
log.errorHandler.startCatching();

log.info(`Launching app version: ${app.getVersion()}`);
log.info(`Platform: ${process.platform}`);
log.info(`Arch: ${process.arch}`);
const version = isProduction
? app.getVersion()
: `${app.getVersion()} (development)`;

log.info(`Launching app version: ${version}`);
log.info(`Platform: ${process.platform} (${process.arch})`);
log.info(`Args: ${process.argv}`);

// Handles Squirrel (https://github.com/Squirrel/Squirrel.Windows) events on Windows.
Expand Down

0 comments on commit b3a2f7f

Please sign in to comment.