(tag, msg)
| 21 | class Log { |
| 22 | |
| 23 | static e(tag, msg) { |
| 24 | if (!tag || Log.FORCE_GLOBAL_TAG) |
| 25 | tag = Log.GLOBAL_TAG; |
| 26 | |
| 27 | let str = `[${tag}] > ${msg}`; |
| 28 | |
| 29 | if (Log.ENABLE_CALLBACK) { |
| 30 | Log.emitter.emit('log', 'error', str); |
| 31 | } |
| 32 | |
| 33 | if (!Log.ENABLE_ERROR) { |
| 34 | return; |
| 35 | } |
| 36 | |
| 37 | if (console.error) { |
| 38 | console.error(str); |
| 39 | } else if (console.warn) { |
| 40 | console.warn(str); |
| 41 | } else { |
| 42 | console.log(str); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | static i(tag, msg) { |
| 47 | if (!tag || Log.FORCE_GLOBAL_TAG) |
no outgoing calls
no test coverage detected