server: add debug log module to server

This commit is contained in:
Gleb Bahmutov
2017-05-25 14:14:23 -04:00
parent 01e3c39585
commit dd14a09aa1
3 changed files with 13 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
# lightweight logging for Node
# only shows log messages if running with
# DEBUG=cypress:start ...
# or
# DEBUG=cypress:* ...
# use
# log = require('./log')
# log('working in %s', process.cwd())
module.exports = require('debug')('cypress:server')
+3
View File
@@ -1,5 +1,8 @@
FileUtil = require("./util/file")
appData = require("./util/app_data")
log = require('./log')
log('making saved state from %s', process.cwd())
module.exports = new FileUtil({
path: appData.path("state.json")
+1
View File
@@ -94,6 +94,7 @@
"cookie": "^0.2.3",
"cookie-parser": "^1.3.3",
"data-uri-to-buffer": "0.0.4",
"debug": "^2.6.8",
"electron-context-menu": "^0.8.0",
"electron-positioner": "3.0.0",
"errorhandler": "1.1.1",