Merge pull request #2208 from rejas/issue-2199_console-debug

Add timestamp to Log.debug
This commit is contained in:
Michael Teeuw 2020-12-08 15:12:39 +01:00 committed by GitHub
commit adb50a9623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 498 additions and 616 deletions

View File

@ -15,7 +15,6 @@ _This release is scheduled to be released on 2021-01-01._
- Added Weatherbit as a provider to Weather module. - Added Weatherbit as a provider to Weather module.
- Added Hindi & Gujarati translation. - Added Hindi & Gujarati translation.
- Chuvash translation. - Chuvash translation.
- Calendar: new options "limitDays" and "coloredEvents" - Calendar: new options "limitDays" and "coloredEvents"
### Updated ### Updated
@ -35,6 +34,7 @@ _This release is scheduled to be released on 2021-01-01._
- Rename Greek translation to correct ISO 639-1 alpha-2 code (gr > el). (#2155) - Rename Greek translation to correct ISO 639-1 alpha-2 code (gr > el). (#2155)
- Add a space after icons of sunrise and sunset (#2169) - Add a space after icons of sunrise and sunset (#2169)
- Fix calendar when no DTEND record found in event, startDate overlay when endDate set (#2177) - Fix calendar when no DTEND record found in event, startDate overlay when endDate set (#2177)
- Fix console.debug not having timestamps (#2199)
- Fix calendar full day event east of UTC start time (#2200) - Fix calendar full day event east of UTC start time (#2200)
- Corrected logic for timeFormat "relative" and "absolute" - Corrected logic for timeFormat "relative" and "absolute"
@ -46,7 +46,7 @@ Special thanks to the following contributors: @bryanzzhu, @bugsounet, @chamakura
### Added ### Added
- `--dry-run` option adde in fetch call within updatenotification node_helper. This is to prevent - `--dry-run` option added in fetch call within updatenotification node_helper. This is to prevent
MagicMirror from consuming any fetch result. Causes conflict with MMPM when attempting to check MagicMirror from consuming any fetch result. Causes conflict with MMPM when attempting to check
for updates to MagicMirror and/or MagicMirror modules. for updates to MagicMirror and/or MagicMirror modules.
- Test coverage with Istanbul, run it with `npm run test:coverage`. - Test coverage with Istanbul, run it with `npm run test:coverage`.

View File

@ -10,7 +10,10 @@
(function (root, factory) { (function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// add timestamps in front of log messages // add timestamps in front of log messages
require("console-stamp")(console, "yyyy-mm-dd HH:MM:ss.l"); require("console-stamp")(console, {
pattern: "yyyy-mm-dd HH:MM:ss.l",
include: ["debug", "log", "info", "warn", "error"]
});
// Node, CommonJS-like // Node, CommonJS-like
module.exports = factory(root.config); module.exports = factory(root.config);
@ -21,8 +24,8 @@
})(this, function (config) { })(this, function (config) {
const logLevel = { const logLevel = {
debug: Function.prototype.bind.call(console.debug, console), debug: Function.prototype.bind.call(console.debug, 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),
info: Function.prototype.bind.call(console.info, 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), error: Function.prototype.bind.call(console.error, console),
group: Function.prototype.bind.call(console.group, console), group: Function.prototype.bind.call(console.group, console),

1061
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,9 +44,9 @@
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "chai": "^4.2.0",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"danger": "^10.5.1", "danger": "^10.5.3",
"eslint-config-prettier": "^6.15.0", "eslint-config-prettier": "^6.15.0",
"eslint-plugin-jsdoc": "^30.7.7", "eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-prettier": "^3.1.4", "eslint-plugin-prettier": "^3.1.4",
"express-basic-auth": "^1.2.0", "express-basic-auth": "^1.2.0",
"husky": "^4.3.0", "husky": "^4.3.0",
@ -56,10 +56,10 @@
"mocha-each": "^2.0.1", "mocha-each": "^2.0.1",
"mocha-logger": "^1.0.7", "mocha-logger": "^1.0.7",
"nyc": "^15.1.0", "nyc": "^15.1.0",
"prettier": "^2.1.2", "prettier": "^2.2.0",
"pretty-quick": "^3.1.0", "pretty-quick": "^3.1.0",
"spectron": "^10.0.1", "spectron": "^10.0.1",
"stylelint": "^13.7.2", "stylelint": "^13.8.0",
"stylelint-config-prettier": "^8.0.2", "stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0", "stylelint-config-standard": "^20.0.0",
"stylelint-prettier": "^1.1.2" "stylelint-prettier": "^1.1.2"
@ -69,12 +69,12 @@
}, },
"dependencies": { "dependencies": {
"colors": "^1.4.0", "colors": "^1.4.0",
"console-stamp": "^0.2.9", "console-stamp": "^3.0.0-rc4.2",
"electron": "^8.5.3", "electron": "^8.5.3",
"eslint": "^7.13.0", "eslint": "^7.14.0",
"express": "^4.17.1", "express": "^4.17.1",
"express-ipfilter": "^1.1.2", "express-ipfilter": "^1.1.2",
"feedme": "^1.2.0", "feedme": "^2.0.1",
"helmet": "^4.2.0", "helmet": "^4.2.0",
"ical": "^0.8.0", "ical": "^0.8.0",
"iconv-lite": "^0.6.2", "iconv-lite": "^0.6.2",
@ -84,8 +84,8 @@
"request": "^2.88.2", "request": "^2.88.2",
"rrule": "^2.6.6", "rrule": "^2.6.6",
"rrule-alt": "^2.2.8", "rrule-alt": "^2.2.8",
"simple-git": "^2.21.0", "simple-git": "^2.23.0",
"socket.io": "^2.3.0", "socket.io": "^3.0.3",
"valid-url": "^1.0.9" "valid-url": "^1.0.9"
}, },
"_moduleAliases": { "_moduleAliases": {

18
vendor/package-lock.json generated vendored
View File

@ -4,9 +4,9 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": { "@fortawesome/fontawesome-free": {
"version": "5.14.0", "version": "5.15.1",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.14.0.tgz", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz",
"integrity": "sha512-OfdMsF+ZQgdKHP9jUbmDcRrP0eX90XXrsXIdyjLbkmSBzmMXPABB8eobUJtivaupucYaByz6WNe1PI1JuYm3qA==" "integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ=="
}, },
"a-sync-waterfall": { "a-sync-waterfall": {
"version": "1.0.1", "version": "1.0.1",
@ -119,14 +119,14 @@
"optional": true "optional": true
}, },
"moment": { "moment": {
"version": "2.28.0", "version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.28.0.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==" "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
}, },
"moment-timezone": { "moment-timezone": {
"version": "0.5.31", "version": "0.5.32",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.32.tgz",
"integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", "integrity": "sha512-Z8QNyuQHQAmWucp8Knmgei8YNo28aLjJq6Ma+jy1ZSpSk5nyfRT8xgUbSQvD2+2UajISfenndwvFuH3NGS+nvA==",
"requires": { "requires": {
"moment": ">= 2.9.0" "moment": ">= 2.9.0"
} }

6
vendor/package.json vendored
View File

@ -10,9 +10,9 @@
"url": "https://github.com/MichMich/MagicMirror/issues" "url": "https://github.com/MichMich/MagicMirror/issues"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.14.0", "@fortawesome/fontawesome-free": "^5.15.1",
"moment": "^2.28.0", "moment": "^2.29.1",
"moment-timezone": "^0.5.31", "moment-timezone": "^0.5.32",
"nunjucks": "^3.2.2", "nunjucks": "^3.2.2",
"suncalc": "^1.8.0", "suncalc": "^1.8.0",
"weathericons": "^2.1.0" "weathericons": "^2.1.0"