mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Log to a file on windows, for now
This commit is contained in:
@@ -12,7 +12,12 @@ nslog = require 'nslog'
|
||||
dialog = require 'dialog'
|
||||
|
||||
console.log = (args...) ->
|
||||
nslog(args.map((arg) -> JSON.stringify(arg)).join(" "))
|
||||
# TODO: Make NSLog work as expected
|
||||
output = args.map((arg) -> JSON.stringify(arg)).join(" ")
|
||||
if process.platform == 'darwin'
|
||||
nslog(output)
|
||||
else
|
||||
fs.writeFileSync('debug.log', output, flag: 'a')
|
||||
|
||||
process.on 'uncaughtException', (error={}) ->
|
||||
nslog(error.message) if error.message?
|
||||
|
||||
Reference in New Issue
Block a user