Test mermaidAPI

This commit is contained in:
Tyler Long
2017-04-16 15:37:32 +08:00
parent a730225700
commit 262a917952
2 changed files with 7 additions and 6 deletions

View File

@@ -74,19 +74,19 @@ var fatal = function () {}
*/
exports.setLogLevel = function (level) {
if (level < 6) {
exports.Log.fatal = console.debug.bind(console, format('FATAL'), 'color:grey;', 'color: red;')
exports.Log.fatal = console.log.bind(console, format('FATAL'), 'color:grey;', 'color: red;')
}
if (level < 5) {
exports.Log.error = console.debug.bind(console, format('ERROR'), 'color:grey;', 'color: red;')
exports.Log.error = console.log.bind(console, format('ERROR'), 'color:grey;', 'color: red;')
}
if (level < 4) {
exports.Log.warn = console.debug.bind(console, format('WARN'), 'color:grey;', 'color: orange;')
exports.Log.warn = console.log.bind(console, format('WARN'), 'color:grey;', 'color: orange;')
}
if (level < 3) {
exports.Log.info = console.debug.bind(console, format('INFO'), 'color:grey;', 'color: info;')
exports.Log.info = console.log.bind(console, format('INFO'), 'color:grey;', 'color: info;')
}
if (level < 2) {
exports.Log.debug = console.debug.bind(console, format('DEBUG'), 'color:grey;', 'color: green;')
exports.Log.debug = console.log.bind(console, format('DEBUG'), 'color:grey;', 'color: green;')
}
}