Add electron-log
The daemon and lbryum log all kinds of useful status/debug info, might as well start doing that in the app too.
This commit is contained in:
parent
2031f36f7c
commit
43297ce414
2 changed files with 5 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
"bluebird": "^3.5.1",
|
"bluebird": "^3.5.1",
|
||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"electron-dl": "^1.6.0",
|
"electron-dl": "^1.6.0",
|
||||||
|
"electron-log": "^2.2.12",
|
||||||
"electron-updater": "^2.16.1",
|
"electron-updater": "^2.16.1",
|
||||||
"formik": "^0.10.4",
|
"formik": "^0.10.4",
|
||||||
"from2": "^2.3.0",
|
"from2": "^2.3.0",
|
||||||
|
|
|
@ -10,6 +10,7 @@ import ChildProcess from 'child_process';
|
||||||
import Assert from 'assert';
|
import Assert from 'assert';
|
||||||
import { app, BrowserWindow, globalShortcut, ipcMain, Menu, Tray } from 'electron';
|
import { app, BrowserWindow, globalShortcut, ipcMain, Menu, Tray } from 'electron';
|
||||||
import { autoUpdater } from 'electron-updater';
|
import { autoUpdater } from 'electron-updater';
|
||||||
|
import log from 'electron-log';
|
||||||
import mainMenu from './menu/mainMenu';
|
import mainMenu from './menu/mainMenu';
|
||||||
import contextMenu from './menu/contextMenu';
|
import contextMenu from './menu/contextMenu';
|
||||||
|
|
||||||
|
@ -18,6 +19,9 @@ const localVersion = app.getVersion();
|
||||||
// Debug configs
|
// Debug configs
|
||||||
const isDevelopment = process.env.NODE_ENV === 'development';
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
// For now, log info messages in production for easier debugging of built apps
|
||||||
|
log.transports.file.level = 'info';
|
||||||
|
|
||||||
// Misc constants
|
// Misc constants
|
||||||
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
||||||
const DAEMON_PATH = process.env.LBRY_DAEMON || Path.join(__static, 'daemon/lbrynet-daemon');
|
const DAEMON_PATH = process.env.LBRY_DAEMON || Path.join(__static, 'daemon/lbrynet-daemon');
|
||||||
|
|
Loading…
Add table
Reference in a new issue