diff --git a/src/server/lib/index.js b/src/server/lib/index.js index 99ef191..7660648 100755 --- a/src/server/lib/index.js +++ b/src/server/lib/index.js @@ -1,4 +1,5 @@ module.exports = { serverManifest: require("./serverManifest"), outputServerError: require("./outputServerError"), + internalConsole: require("./internalConsole"), } \ No newline at end of file diff --git a/src/server/lib/internalConsole/index.js b/src/server/lib/internalConsole/index.js new file mode 100644 index 0000000..178fc37 --- /dev/null +++ b/src/server/lib/internalConsole/index.js @@ -0,0 +1,37 @@ +module.exports = class InternalConsole { + static log = (...args) => { + if (!global.consoleSilent) { + console.log(...args) + } + } + + static error = (...args) => { + if (!global.consoleSilent) { + console.error(...args) + } + } + + static warn = (...args) => { + if (!global.consoleSilent) { + console.warn(...args) + } + } + + static info = (...args) => { + if (!global.consoleSilent) { + console.info(...args) + } + } + + static debug = (...args) => { + if (!global.consoleSilent) { + console.debug(...args) + } + } + + static table = (...args) => { + if (!global.consoleSilent) { + console.table(...args) + } + } +} \ No newline at end of file