add log.js module for renderer logging

This commit is contained in:
Feross Aboukhadijeh
2016-03-21 01:57:12 -07:00
parent e7e7afab3b
commit f0df9011df
6 changed files with 48 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
var log = require('./log')
module.exports = function () {
if (process.platform === 'win32') {
var path = require('path')
@@ -86,7 +88,7 @@ function registerProtocolHandlerWin32 (protocol, name, icon, command) {
commandKey.set('', Registry.REG_SZ, '"' + command + '" "%1"', callback)
function callback (err) {
if (err) console.error(err.message || err)
if (err) log.error(err.message || err)
}
}
@@ -118,6 +120,6 @@ function registerFileHandlerWin32 (ext, id, name, icon, command) {
commandKey.set('', Registry.REG_SZ, '"' + command + '" "%1"', callback)
function callback (err) {
if (err) console.error(err.message || err)
if (err) log.error(err.message || err)
}
}