diff --git a/js/app.js b/js/app.js index 600b379a..7cf7dd2e 100644 --- a/js/app.js +++ b/js/app.js @@ -34,10 +34,10 @@ if (process.env.MM_PORT) { // The next part is here to prevent a major exception when there // is no internet connection. This could probable be solved better. process.on("uncaughtException", function (err) { - Log.log("Whoops! There was an uncaught exception..."); + Log.error("Whoops! There was an uncaught exception..."); Log.error(err); - Log.log("MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?"); - Log.log("If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues"); + Log.error("MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?"); + Log.error("If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues"); }); /* App - The core app. diff --git a/js/logger.js b/js/logger.js index 523b9ce5..157420a7 100644 --- a/js/logger.js +++ b/js/logger.js @@ -1,5 +1,6 @@ /* Magic Mirror - * Logger + * Log + * * This logger is very simple, but needs to be extended. * This system can eventually be used to push the log messages to an external target. * diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index 6258ed39..45338fff 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -436,7 +436,7 @@ var CalendarFetcher = function (url, reloadInterval, excludedEvents, maximumEntr * Broadcast the existing events. */ this.broadcastEvents = function () { - Log.info("Broadcasting " + events.length + " events."); + Log.info("Calendar-Fetcher: Broadcasting " + events.length + " events."); eventsReceivedCallback(self); }; diff --git a/modules/default/newsfeed/fetcher.js b/modules/default/newsfeed/fetcher.js index 6140780a..da9616dc 100644 --- a/modules/default/newsfeed/fetcher.js +++ b/modules/default/newsfeed/fetcher.js @@ -35,7 +35,6 @@ var Fetcher = function (url, reloadInterval, encoding, logFeedWarnings) { /* fetchNews() * Request the new items. */ - var fetchNews = function () { clearTimeout(reloadTimer); reloadTimer = null; @@ -60,16 +59,15 @@ var Fetcher = function (url, reloadInterval, encoding, logFeedWarnings) { url: url }); } else if (logFeedWarnings) { - console.log("Can't parse feed item:"); - console.log(item); - console.log("Title: " + title); - console.log("Description: " + description); - console.log("Pubdate: " + pubdate); + Log.warn("Can't parse feed item:"); + Log.warn(item); + Log.warn("Title: " + title); + Log.warn("Description: " + description); + Log.warn("Pubdate: " + pubdate); } }); parser.on("end", function () { - //console.log("end parsing - " + url); self.broadcastItems(); scheduleTimer(); }); @@ -94,9 +92,7 @@ var Fetcher = function (url, reloadInterval, encoding, logFeedWarnings) { /* scheduleTimer() * Schedule the timer for the next update. */ - var scheduleTimer = function () { - //console.log('Schedule update timer.'); clearTimeout(reloadTimer); reloadTimer = setTimeout(function () { fetchNews(); @@ -128,10 +124,10 @@ var Fetcher = function (url, reloadInterval, encoding, logFeedWarnings) { */ this.broadcastItems = function () { if (items.length <= 0) { - //console.log('No items to broadcast yet.'); + Log.info("Newsfeed-Fetcher: No items to broadcast yet."); return; } - Log.info("Broadcasting " + items.length + " items."); + Log.info("Newsfeed-Fetcher: Broadcasting " + items.length + " items."); itemsReceivedCallback(self); };