mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Add back debug() for safe, but it is marked as deprecated
This commit is contained in:
parent
279e2eb3f6
commit
9ec29c1bc4
10
src/util.js
10
src/util.js
@ -7,7 +7,7 @@
|
||||
// Backend uses the compiled file util.js
|
||||
// Frontend uses util.ts
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMonitorRelativeURL = exports.genSecret = exports.getCryptoRandomInt = exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.log_debug = exports.log_error = exports.log_warn = exports.log_info = exports.ucfirst = exports.sleep = exports.flipStatus = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
|
||||
exports.getMonitorRelativeURL = exports.genSecret = exports.getCryptoRandomInt = exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.log_debug = exports.log_error = exports.log_warn = exports.log_info = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
|
||||
const _dayjs = require("dayjs");
|
||||
const dayjs = _dayjs;
|
||||
exports.isDev = process.env.NODE_ENV === "development";
|
||||
@ -44,6 +44,14 @@ function ucfirst(str) {
|
||||
return firstLetter.toUpperCase() + str.substr(1);
|
||||
}
|
||||
exports.ucfirst = ucfirst;
|
||||
/**
|
||||
* @deprecated Use log_debug
|
||||
* @param msg
|
||||
*/
|
||||
function debug(msg) {
|
||||
log("", msg, "debug");
|
||||
}
|
||||
exports.debug = debug;
|
||||
function log(module, msg, level) {
|
||||
module = module.toUpperCase();
|
||||
level = level.toUpperCase();
|
||||
|
@ -49,6 +49,14 @@ export function ucfirst(str: string) {
|
||||
return firstLetter.toUpperCase() + str.substr(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use log_debug
|
||||
* @param msg
|
||||
*/
|
||||
export function debug(msg: any) {
|
||||
log("", msg, "debug");
|
||||
}
|
||||
|
||||
function log(module: string, msg: any, level:string) {
|
||||
module = module.toUpperCase();
|
||||
level = level.toUpperCase();
|
||||
|
Loading…
Reference in New Issue
Block a user