Prettified all files.

This commit is contained in:
2019-07-18 12:26:39 +02:00
parent 7744b92771
commit 2d400a18ec
125 changed files with 11184 additions and 8154 deletions
+13 -10
View File
@@ -20,15 +20,14 @@ try {
/** Basic class for app specific logging requirements.
* Can be used to implement persistent logging in electron apps.
* Uses a logMessage cache to prevent error overflows. This is
* Uses a logMessage cache to prevent error overflows. This is
* needed since errors may occur very frequently
* (e.g. display update loops at 60fps, programmatic loops, ...).
*
*
* The logging handlers can be overwritten by calling the static
* setup method.
*/
export default class Logging {
/** Static log function.
* @param {*} message
*/
@@ -37,9 +36,9 @@ export default class Logging {
}
/**
* Static warn function.
* Static warn function.
* Emits each warning only once per session.
* @param {*} message
* @param {*} message
*/
static warn(message) {
if (!logMessages.has(message)) {
@@ -49,10 +48,10 @@ export default class Logging {
}
/**
* Static error function.
* Emits each error message only once per session.
* @param {*} message
*/
* Static error function.
* Emits each error message only once per session.
* @param {*} message
*/
static error(message) {
if (!logMessages.has(message)) {
logMessages.add(message)
@@ -60,7 +59,11 @@ export default class Logging {
}
}
static setup({log=console.log, warn=console.warn, error=console.error} = {}) {
static setup({
log = console.log,
warn = console.warn,
error = console.error
} = {}) {
logHandlers.log = log
logHandlers.warn = warn
logHandlers.error = error