Change default log level to info
Eventually we want to fix this API so that you can provide per-instance levels, etc but for now this is a quick fix. Fixes wycats/handlebars-site#91
This commit is contained in:
@@ -221,7 +221,7 @@ export var logger = {
|
||||
INFO: 1,
|
||||
WARN: 2,
|
||||
ERROR: 3,
|
||||
level: 3,
|
||||
level: 1,
|
||||
|
||||
// Can be overridden in the host environment
|
||||
log: function(level, message) {
|
||||
|
||||
+6
-4
@@ -276,15 +276,17 @@ describe('builtin helpers', function() {
|
||||
equals(3, levelArg);
|
||||
equals("whee", logArg);
|
||||
});
|
||||
it('should not output to console', function() {
|
||||
it('should not output to info', function() {
|
||||
var string = "{{log blah}}";
|
||||
var hash = { blah: "whee" };
|
||||
|
||||
console.info = function() {
|
||||
throw new Error();
|
||||
console.info = function(log) {
|
||||
equals("whee", log);
|
||||
called = true;
|
||||
};
|
||||
|
||||
shouldCompileTo(string, hash, "", "log should not display");
|
||||
shouldCompileTo(string, hash, "");
|
||||
equals(true, called);
|
||||
});
|
||||
it('should log at data level', function() {
|
||||
var string = "{{log blah}}";
|
||||
|
||||
Reference in New Issue
Block a user