From 715210944e2256e9fe8a51fd7d1bbc36d76dad4f Mon Sep 17 00:00:00 2001 From: Corey Johnson & Kevin Sawicki Date: Wed, 29 May 2013 11:20:59 -0700 Subject: [PATCH] Forward console.log to NSLog in browser process --- package.json | 3 ++- src/main.coffee | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cea5aa651..762fff56c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ "text-tmbundle": "1.0.0", "textmate-clojure": "1.0.0", "xml-tmbundle": "1.0.0", - "yaml-tmbundle": "1.0.0" + "yaml-tmbundle": "1.0.0", + "nslog": "0.1.0" }, "devDependencies": { "biscotto": "0.0.11", diff --git a/src/main.coffee b/src/main.coffee index 39049f682..f9638eb0b 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -2,6 +2,10 @@ fs = require 'fs' path = require 'path' delegate = require 'atom_delegate' optimist = require 'optimist' +nslog = require('nslog') + +console.log = (args...) -> nslog(args.join(" ")) + require 'coffee-script' atomApplication = null