Skip to content

Instantly share code, notes, and snippets.

@chrisabrams
Last active December 20, 2015 19:09
Show Gist options
  • Save chrisabrams/6181585 to your computer and use it in GitHub Desktop.
Save chrisabrams/6181585 to your computer and use it in GitHub Desktop.

Revisions

  1. chrisabrams revised this gist Aug 8, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions test.coffee
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    fs = require 'fs'
    util = require("util")
    util = require "util"
    log = fs.createWriteStream(process.cwd() + "/test/stdout.log")
    console.log = console.info = (t) ->
    out = undefined
    if t
    if t and ~t.indexOf("%")
    out = util.format.apply(util, arguments)
    process.stdout.write out + "\n"
    return
  2. chrisabrams created this gist Aug 8, 2013.
    12 changes: 12 additions & 0 deletions test.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    fs = require 'fs'
    util = require("util")
    log = fs.createWriteStream(process.cwd() + "/test/stdout.log")
    console.log = console.info = (t) ->
    out = undefined
    if t
    out = util.format.apply(util, arguments)
    process.stdout.write out + "\n"
    return
    else
    out = Array::join.call(arguments, " ")
    out and log.write(out + "\n")