mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Merge pull request #2184 from rejas/debug_log_level
Add new log level "debug"
This commit is contained in:
commit
262711a127
@ -11,6 +11,8 @@ _This release is scheduled to be released on 2021-01-01._
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Added new log level "debug" to the logger.
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
|
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
|
||||||
@ -229,7 +231,7 @@ Special thanks to @sdetweil for all his great contributions!
|
|||||||
|
|
||||||
- Option to show event location in calendar
|
- Option to show event location in calendar
|
||||||
- Finnish translation for "Feels" and "Weeks"
|
- Finnish translation for "Feels" and "Weeks"
|
||||||
- Russian translation for “Feels”
|
- Russian translation for "Feels"
|
||||||
- Calendar module: added `nextDaysRelative` config option
|
- Calendar module: added `nextDaysRelative` config option
|
||||||
- Add `broadcastPastEvents` config option for calendars to include events from the past `maximumNumberOfDays` in event broadcasts
|
- Add `broadcastPastEvents` config option for calendars to include events from the past `maximumNumberOfDays` in event broadcasts
|
||||||
- Added feature to broadcast news feed items `NEWS_FEED` and updated news items `NEWS_FEED_UPDATED` in default [newsfeed](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/newsfeed) module (when news is updated) with documented default and `config.js` options in [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md)
|
- Added feature to broadcast news feed items `NEWS_FEED` and updated news items `NEWS_FEED_UPDATED` in default [newsfeed](https://github.com/MichMich/MagicMirror/tree/develop/modules/default/newsfeed) module (when news is updated) with documented default and `config.js` options in [README.md](https://github.com/MichMich/MagicMirror/blob/develop/modules/default/newsfeed/README.md)
|
||||||
|
@ -28,7 +28,7 @@ var config = {
|
|||||||
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
|
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
|
||||||
|
|
||||||
language: "en",
|
language: "en",
|
||||||
logLevel: ["INFO", "LOG", "WARN", "ERROR"],
|
logLevel: ["DEBUG", "INFO", "LOG", "WARN", "ERROR"],
|
||||||
timeFormat: 24,
|
timeFormat: 24,
|
||||||
units: "metric",
|
units: "metric",
|
||||||
// serverOnly: true/false/"local" ,
|
// serverOnly: true/false/"local" ,
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
}
|
}
|
||||||
})(this, function (config) {
|
})(this, function (config) {
|
||||||
const logLevel = {
|
const logLevel = {
|
||||||
|
debug: Function.prototype.bind.call(console.debug, console),
|
||||||
info: Function.prototype.bind.call(console.info, console),
|
info: Function.prototype.bind.call(console.info, console),
|
||||||
log: Function.prototype.bind.call(console.log, console),
|
log: Function.prototype.bind.call(console.log, console),
|
||||||
error: Function.prototype.bind.call(console.error, console),
|
|
||||||
warn: Function.prototype.bind.call(console.warn, console),
|
warn: Function.prototype.bind.call(console.warn, console),
|
||||||
|
error: Function.prototype.bind.call(console.error, console),
|
||||||
group: Function.prototype.bind.call(console.group, console),
|
group: Function.prototype.bind.call(console.group, console),
|
||||||
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
|
groupCollapsed: Function.prototype.bind.call(console.groupCollapsed, console),
|
||||||
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
|
groupEnd: Function.prototype.bind.call(console.groupEnd, console),
|
||||||
|
@ -350,7 +350,7 @@ Module.register("newsfeed", {
|
|||||||
this.activeItem = 0;
|
this.activeItem = 0;
|
||||||
}
|
}
|
||||||
this.resetDescrOrFullArticleAndTimer();
|
this.resetDescrOrFullArticleAndTimer();
|
||||||
Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")");
|
Log.debug(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")");
|
||||||
this.updateDom(100);
|
this.updateDom(100);
|
||||||
} else if (notification === "ARTICLE_PREVIOUS") {
|
} else if (notification === "ARTICLE_PREVIOUS") {
|
||||||
this.activeItem--;
|
this.activeItem--;
|
||||||
@ -358,7 +358,7 @@ Module.register("newsfeed", {
|
|||||||
this.activeItem = this.newsItems.length - 1;
|
this.activeItem = this.newsItems.length - 1;
|
||||||
}
|
}
|
||||||
this.resetDescrOrFullArticleAndTimer();
|
this.resetDescrOrFullArticleAndTimer();
|
||||||
Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")");
|
Log.debug(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")");
|
||||||
this.updateDom(100);
|
this.updateDom(100);
|
||||||
}
|
}
|
||||||
// if "more details" is received the first time: show article summary, on second time show full article
|
// if "more details" is received the first time: show article summary, on second time show full article
|
||||||
@ -367,8 +367,8 @@ Module.register("newsfeed", {
|
|||||||
if (this.config.showFullArticle === true) {
|
if (this.config.showFullArticle === true) {
|
||||||
this.scrollPosition += this.config.scrollLength;
|
this.scrollPosition += this.config.scrollLength;
|
||||||
window.scrollTo(0, this.scrollPosition);
|
window.scrollTo(0, this.scrollPosition);
|
||||||
Log.info(this.name + " - scrolling down");
|
Log.debug(this.name + " - scrolling down");
|
||||||
Log.info(this.name + " - ARTICLE_MORE_DETAILS, scroll position: " + this.config.scrollLength);
|
Log.debug(this.name + " - ARTICLE_MORE_DETAILS, scroll position: " + this.config.scrollLength);
|
||||||
} else {
|
} else {
|
||||||
this.showFullArticle();
|
this.showFullArticle();
|
||||||
}
|
}
|
||||||
@ -376,12 +376,12 @@ Module.register("newsfeed", {
|
|||||||
if (this.config.showFullArticle === true) {
|
if (this.config.showFullArticle === true) {
|
||||||
this.scrollPosition -= this.config.scrollLength;
|
this.scrollPosition -= this.config.scrollLength;
|
||||||
window.scrollTo(0, this.scrollPosition);
|
window.scrollTo(0, this.scrollPosition);
|
||||||
Log.info(this.name + " - scrolling up");
|
Log.debug(this.name + " - scrolling up");
|
||||||
Log.info(this.name + " - ARTICLE_SCROLL_UP, scroll position: " + this.config.scrollLength);
|
Log.debug(this.name + " - ARTICLE_SCROLL_UP, scroll position: " + this.config.scrollLength);
|
||||||
}
|
}
|
||||||
} else if (notification === "ARTICLE_LESS_DETAILS") {
|
} else if (notification === "ARTICLE_LESS_DETAILS") {
|
||||||
this.resetDescrOrFullArticleAndTimer();
|
this.resetDescrOrFullArticleAndTimer();
|
||||||
Log.info(this.name + " - showing only article titles again");
|
Log.debug(this.name + " - showing only article titles again");
|
||||||
this.updateDom(100);
|
this.updateDom(100);
|
||||||
} else if (notification === "ARTICLE_TOGGLE_FULL") {
|
} else if (notification === "ARTICLE_TOGGLE_FULL") {
|
||||||
if (this.config.showFullArticle) {
|
if (this.config.showFullArticle) {
|
||||||
@ -411,7 +411,7 @@ Module.register("newsfeed", {
|
|||||||
}
|
}
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
Log.info(this.name + " - showing " + this.isShowingDescription ? "article description" : "full article");
|
Log.debug(this.name + " - showing " + this.isShowingDescription ? "article description" : "full article");
|
||||||
this.updateDom(100);
|
this.updateDom(100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -87,7 +87,7 @@ WeatherProvider.register("ukmetofficedatahub", {
|
|||||||
// Did not receive usable new data.
|
// Did not receive usable new data.
|
||||||
// Maybe this needs a better check?
|
// Maybe this needs a better check?
|
||||||
Log.error("Possibly bad current/hourly data?");
|
Log.error("Possibly bad current/hourly data?");
|
||||||
Log.info(data);
|
Log.error(data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ WeatherProvider.register("ukmetofficedatahub", {
|
|||||||
// Did not receive usable new data.
|
// Did not receive usable new data.
|
||||||
// Maybe this needs a better check?
|
// Maybe this needs a better check?
|
||||||
Log.error("Possibly bad forecast data?");
|
Log.error("Possibly bad forecast data?");
|
||||||
Log.info(data);
|
Log.error(data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user