Added logging module

This commit is contained in:
2019-05-24 09:53:27 +02:00
parent becb749e02
commit 7f4b7fb1ff
5 changed files with 45 additions and 18 deletions
+2 -6
View File
@@ -4,6 +4,7 @@
import Interface from './interface.js'
import { Points, Angle, MapProxy } from './utils.js'
import Events from './events.js'
import Logging from './logging.js'
/** Interaction patterns
@@ -916,11 +917,6 @@ export class InteractionMapper extends InteractionDelegate {
this.logInteractionsAbove = logInteractionsAbove
}
log(message) {
let logger = (typeof app != 'undefined' && app.log) ? app : console
logger.log(message)
}
get targetInterface() {
return IInteractionMapperTarget
}
@@ -943,7 +939,7 @@ export class InteractionMapper extends InteractionDelegate {
let size = this.interaction.current.size
let limit = this.logInteractionsAbove
if (size > limit) {
this.log(`Number of interactions ${size} exceeds ${limit}`)
Logging.log(`Number of interactions ${size} exceeds ${limit}`)
}
}