Log Improved

This commit is contained in:
Luis Fernando Molina committed 2018-06-27 19:40:46 +02:00
1 parent 9ac776cc53
commit f155a3b9d5
4 files changed
+14 -10

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ let splashScreenNeeded = true;
function newCanvas() {
const MODULE_NAME = "Canvas";
const INFO_LOG = true;
const INFO_LOG = false;
const ERROR_LOG = true;
const INTENSIVE_LOG = false;
const logger = newWebDebugLog();
+1 -1
View File
@@ -10,7 +10,7 @@ let viewPort = newViewPort();
function newDashboard() {
const MODULE_NAME = "Dashboard";
const INFO_LOG = true;
const INFO_LOG = false;
const ERROR_LOG = true;
const INTENSIVE_LOG = false;
const logger = newWebDebugLog();
+1 -1
View File
@@ -1,7 +1,7 @@
function newAppLoader() {
const MODULE_NAME = "App Loader";
const INFO_LOG = true;
const INFO_LOG = false;
const ERROR_LOG = true;
const INTENSIVE_LOG = false;
const logger = newWebDebugLog();
+11 -7
View File
@@ -35,7 +35,11 @@ function spacePad(str, max) {
function loadAdvancedAlgosPlatform() {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] loadAdvancedAlgosPlatform -> Entering function.");
const MODULE_NAME = "App Pre-Loader";
const INFO_LOG = false;
const ERROR_LOG = true;
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadAdvancedAlgosPlatform -> Entering function."); }
/* The first thing to do here is to add the canvas where all the action is going to happen. */
@@ -61,7 +65,7 @@ function loadAdvancedAlgosPlatform() {
function onServerReponded(pResponseFromServer) {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] loadAdvancedAlgosPlatform -> onServerReponded -> Entering function.");
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadAdvancedAlgosPlatform -> onServerReponded -> Entering function."); }
let responseFromServer = JSON.parse(pResponseFromServer);
@@ -69,7 +73,7 @@ function loadAdvancedAlgosPlatform() {
if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) {
console.log("Authentication Error. " + err.message);
if (INFO_LOG === true) { console.log("Authentication Error. " + err.message); }
return;
}
@@ -81,7 +85,7 @@ function loadAdvancedAlgosPlatform() {
function loadDebugModule() {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] loadDebugModule -> Entering function.");
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadDebugModule -> Entering function."); }
let path = "WebDebugLog.js";
@@ -89,7 +93,7 @@ function loadAdvancedAlgosPlatform() {
function onRequired(pModule) {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] " + path + " downloaded.");
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
loadModules();
@@ -100,7 +104,7 @@ function loadAdvancedAlgosPlatform() {
function loadModules() {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] loadModules -> Entering function.");
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] loadModules -> Entering function."); }
let path = "Scripts/AppLoader.js";
@@ -108,7 +112,7 @@ function loadAdvancedAlgosPlatform() {
function onRequired(pModule) {
console.log(spacePad("App Pre-Loader", 50) + " : " + "[INFO] " + path + " downloaded.");
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
let APP_LOADER_MODULE = newAppLoader();
APP_LOADER_MODULE.loadModules();