mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-20 09:46:31 +00:00
refactor(gui): Only enable full debug output on demand (#1600)
This disables full wildcard debug output by default now, leave the possibility to manually enable selective debug output via the `DEBUG` environment variable. Change-Type: patch
This commit is contained in:
parent
a2f1ddddb5
commit
762d570f8b
@ -22,10 +22,6 @@ const path = require('path')
|
|||||||
const EXIT_CODES = require('../shared/exit-codes')
|
const EXIT_CODES = require('../shared/exit-codes')
|
||||||
let mainWindow = null
|
let mainWindow = null
|
||||||
|
|
||||||
// Enable drivelist debugging information
|
|
||||||
// See https://github.com/resin-io-modules/drivelist
|
|
||||||
process.env.DRIVELIST_DEBUG = 1
|
|
||||||
|
|
||||||
electron.app.on('window-all-closed', electron.app.quit)
|
electron.app.on('window-all-closed', electron.app.quit)
|
||||||
|
|
||||||
// Sending a `SIGINT` (e.g: Ctrl-C) to an Electron app that registers
|
// Sending a `SIGINT` (e.g: Ctrl-C) to an Electron app that registers
|
||||||
|
@ -9,7 +9,12 @@
|
|||||||
|
|
||||||
<!-- Enable debug information from all modules that use `debug` -->
|
<!-- Enable debug information from all modules that use `debug` -->
|
||||||
<!-- See https://github.com/visionmedia/debug#browser-support -->
|
<!-- See https://github.com/visionmedia/debug#browser-support -->
|
||||||
<script>window.localStorage.debug = '*';</script>
|
<script>
|
||||||
|
// Enable drivelist debugging information
|
||||||
|
// See https://github.com/resin-io-modules/drivelist
|
||||||
|
process.env['DRIVELIST_DEBUG'] = /drivelist|^\*$/i.test(process.env['DEBUG']) ? '1' : '';
|
||||||
|
window.localStorage.debug = process.env['DEBUG'];
|
||||||
|
</script>
|
||||||
|
|
||||||
<script src="./app.js"></script>
|
<script src="./app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
// Enable debug information from all modules that use `debug`
|
|
||||||
// See https://github.com/visionmedia/debug#browser-support
|
|
||||||
process.env.DEBUG = '*'
|
|
||||||
|
|
||||||
// See http://electron.atom.io/docs/v0.37.7/api/environment-variables/#electronrunasnode
|
// See http://electron.atom.io/docs/v0.37.7/api/environment-variables/#electronrunasnode
|
||||||
//
|
//
|
||||||
// Notice that if running electron with `ELECTRON_RUN_AS_NODE`, the binary
|
// Notice that if running electron with `ELECTRON_RUN_AS_NODE`, the binary
|
||||||
|
Loading…
x
Reference in New Issue
Block a user