mirror of https://gitee.com/bigwinds/arangodb
fix console.warn in Foxx
This commit is contained in:
parent
fbbe4d08cd
commit
5947e2d9a8
|
@ -45,6 +45,9 @@ function nativeLogger(level, levelNum, mount) {
|
||||||
logLevel = 'info'; // require('console').trace also uses INFO level
|
logLevel = 'info'; // require('console').trace also uses INFO level
|
||||||
}
|
}
|
||||||
if (NATIVE_LOG_LEVELS.indexOf(logLevel) !== -1) {
|
if (NATIVE_LOG_LEVELS.indexOf(logLevel) !== -1) {
|
||||||
|
if (logLevel === 'warn') {
|
||||||
|
logLevel = 'warning'; // require('console').warn uses WARNING level
|
||||||
|
}
|
||||||
return function (message) {
|
return function (message) {
|
||||||
arangoConsole._log(logLevel, `${mount} ${message}`);
|
arangoConsole._log(logLevel, `${mount} ${message}`);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue