fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: fix - check for success before changing current element
[fnpeditor.git]
/
src
/
fnpjs
/
logging
/
handlers.js
diff --git
a/src/fnpjs/logging/handlers.js
b/src/fnpjs/logging/handlers.js
index
f6f0509
..
5b14be6
100644
(file)
--- a/
src/fnpjs/logging/handlers.js
+++ b/
src/fnpjs/logging/handlers.js
@@
-6,9
+6,13
@@
define(function() {
return {
console: function(record) {
/* global console */
return {
console: function(record) {
/* global console */
- var method;
+ var level = record.level,
+ method;
if(console) {
if(console) {
- method = (typeof console[record.level] === 'function') ? record.level : 'log';
+ if(level === 'warning') {
+ level = 'warn';
+ }
+ method = (typeof console[level] === 'function') ? level : 'log';
console[method](record.message);
}
},
console[method](record.message);
}
},