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

3
dist/demo/index.js vendored
View File

@@ -1,4 +1,5 @@
const api = require('../mermaidAPI.js') const api = require('../../src/mermaidAPI.js')
console.log(api)
const r = api.parse(`sequenceDiagram const r = api.parse(`sequenceDiagram
loop every day loop every day

View File

@@ -74,19 +74,19 @@ var fatal = function () {}
*/ */
exports.setLogLevel = function (level) { exports.setLogLevel = function (level) {
if (level < 6) { 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) { 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) { 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) { 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) { 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;')
} }
} }