1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-12 10:13:46 +02:00

Log this.chartPeriodHrs

This commit is contained in:
Louis Lam 2022-05-01 17:46:43 +08:00
parent 272956025c
commit 410805052e
3 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,7 @@ import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
import { LineChart } from "vue-chart-3";
import { useToast } from "vue-toastification";
import { DOWN } from "../util.ts";
import { DOWN, log } from "../util.ts";
dayjs.extend(utc);
dayjs.extend(timezone);
@ -240,6 +240,9 @@ export default {
// And mirror latest change to this.heartbeatList
this.$watch(() => this.$root.heartbeatList[this.monitorId],
(heartbeatList) => {
log.debug("ping_chart", `this.chartPeriodHrs type ${typeof this.chartPeriodHrs}, value: ${this.chartPeriodHrs}`);
if (this.chartPeriodHrs !== "0") {
const newBeat = heartbeatList.at(-1);
if (newBeat && dayjs.utc(newBeat.time) > dayjs.utc(this.heartbeatList.at(-1)?.time)) {

View File

@ -102,7 +102,7 @@ class Logger {
}
else if (level === "DEBUG") {
if (exports.isDev) {
console.debug(formattedMessage);
console.log(formattedMessage);
}
}
else {

View File

@ -113,7 +113,7 @@ class Logger {
console.error(formattedMessage);
} else if (level === "DEBUG") {
if (isDev) {
console.debug(formattedMessage);
console.log(formattedMessage);
}
} else {
console.log(formattedMessage);