justjohn/twig.js — pull request #141 by webberig (2014-02-16 08:17:19+00:00)
Title: Set the proper console context when calling Twig.log.error

In Google Chrome, the console methods throw an "Illegal invocation" error if called with a context other then console:

var myFunc = console.log;
myFunc("foo");

The log wrapper in Twig.js makes the same error:
Twig.log.error = console.log

I solved this problem by applying the proper context.