No need to parse args before passing to nslog.

This commit is contained in:
Cheng Zhao 2014-03-20 21:27:27 +08:00
parent e9f4820dd4
commit eb1bed118f

View File

@ -9,12 +9,7 @@ optimist = require 'optimist'
nslog = require 'nslog'
dialog = require 'dialog'
console.log = (args...) ->
# TODO: Make NSLog work as expected
output = args.map((arg) -> JSON.stringify(arg)).join(" ")
nslog(output)
if process.platform isnt 'darwin'
fs.writeFileSync('debug.log', output, flag: 'a')
console.log = nslog
process.on 'uncaughtException', (error={}) ->
nslog(error.message) if error.message?