Added logging module
This commit is contained in:
Vendored
+15
-6
@@ -1545,6 +1545,19 @@
|
||||
|
||||
}
|
||||
|
||||
/** Basic class for app specific logging requirements.
|
||||
* Can be used to implement persistent logging in electron apps.
|
||||
*/
|
||||
class Logging {
|
||||
|
||||
/** Static log function.
|
||||
* @param {*} message
|
||||
*/
|
||||
log(message) {
|
||||
console.log(message);
|
||||
}
|
||||
}
|
||||
|
||||
/* globals Hammer, propagating */
|
||||
|
||||
/** Interaction patterns
|
||||
@@ -2456,11 +2469,6 @@
|
||||
this.logInteractionsAbove = logInteractionsAbove;
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console;
|
||||
logger.log(message);
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
return IInteractionMapperTarget
|
||||
}
|
||||
@@ -2483,7 +2491,7 @@
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7368,6 +7376,7 @@
|
||||
window.InteractionMapper = InteractionMapper$1;
|
||||
window.InteractionPoints = InteractionPoints;
|
||||
window.Interface = Interface;
|
||||
window.Logging = Logging;
|
||||
window.PointMap = PointMap;
|
||||
window.Rect = Rect;
|
||||
window.Points = Points;
|
||||
|
||||
Vendored
+14
-6
@@ -4709,6 +4709,19 @@
|
||||
// }
|
||||
}
|
||||
|
||||
/** Basic class for app specific logging requirements.
|
||||
* Can be used to implement persistent logging in electron apps.
|
||||
*/
|
||||
class Logging {
|
||||
|
||||
/** Static log function.
|
||||
* @param {*} message
|
||||
*/
|
||||
log(message) {
|
||||
console.log(message);
|
||||
}
|
||||
}
|
||||
|
||||
/* globals Hammer, propagating */
|
||||
|
||||
/** Interaction patterns
|
||||
@@ -5620,11 +5633,6 @@
|
||||
this.logInteractionsAbove = logInteractionsAbove;
|
||||
}
|
||||
|
||||
log(message) {
|
||||
let logger = (typeof app != 'undefined' && app.log) ? app : console;
|
||||
logger.log(message);
|
||||
}
|
||||
|
||||
get targetInterface() {
|
||||
return IInteractionMapperTarget
|
||||
}
|
||||
@@ -5647,7 +5655,7 @@
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user