@icreate/core
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -5,3 +5,3 @@ /* | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 02:06:01 | ||
* @LastEditTime: 2022-03-11 08:49:46 | ||
* @Descripttion: | ||
@@ -171,3 +171,3 @@ * @FilePath: \src\interfaces\interfaces.ts | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 00:51:58 | ||
* @LastEditTime: 2022-03-11 08:50:22 | ||
* @Descripttion: | ||
@@ -193,4 +193,5 @@ * @FilePath: \src\core\logger.ts | ||
*/ | ||
Logger.prototype.debug = function (logObject) { | ||
this.log('DEBUG: ', LogLevels.DEBUG); | ||
Logger.prototype.debug = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("DEBUG: " + message, LogLevels.DEBUG); | ||
this.log(logObject, LogLevels.DEBUG); | ||
@@ -202,4 +203,5 @@ }; | ||
*/ | ||
Logger.prototype.info = function (logObject) { | ||
this.log('INFO: ', LogLevels.INFO); | ||
Logger.prototype.info = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("INFO: " + message, LogLevels.INFO); | ||
this.log(logObject, LogLevels.INFO); | ||
@@ -211,4 +213,5 @@ }; | ||
*/ | ||
Logger.prototype.warn = function (logObject) { | ||
this.log('WARN: ', LogLevels.WARN); | ||
Logger.prototype.warn = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("WARN: " + message, LogLevels.WARN); | ||
this.log(logObject, LogLevels.WARN); | ||
@@ -220,4 +223,5 @@ }; | ||
*/ | ||
Logger.prototype.error = function (logObject) { | ||
this.log('ERROR: ', LogLevels.ERROR); | ||
Logger.prototype.error = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("ERROR: " + message, LogLevels.ERROR); | ||
this.log(logObject, LogLevels.ERROR); | ||
@@ -229,4 +233,5 @@ }; | ||
*/ | ||
Logger.prototype.fatal = function (logObject) { | ||
this.log('FATAL: ', LogLevels.FATAL); | ||
Logger.prototype.fatal = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("FATAL: " + message, LogLevels.FATAL); | ||
this.log(logObject, LogLevels.FATAL); | ||
@@ -343,2 +348,5 @@ }; | ||
}; | ||
Utils.isString = function (obj) { | ||
return Object.prototype.toString.call(obj) === "[object String]"; | ||
}; | ||
/** | ||
@@ -345,0 +353,0 @@ * Sets a cookie value for given key. |
@@ -11,3 +11,3 @@ (function (global, factory) { | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 02:06:01 | ||
* @LastEditTime: 2022-03-11 08:49:46 | ||
* @Descripttion: | ||
@@ -176,3 +176,3 @@ * @FilePath: \src\interfaces\interfaces.ts | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 00:51:58 | ||
* @LastEditTime: 2022-03-11 08:50:22 | ||
* @Descripttion: | ||
@@ -198,4 +198,5 @@ * @FilePath: \src\core\logger.ts | ||
*/ | ||
Logger.prototype.debug = function (logObject) { | ||
this.log('DEBUG: ', exports.LogLevels.DEBUG); | ||
Logger.prototype.debug = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("DEBUG: " + message, exports.LogLevels.DEBUG); | ||
this.log(logObject, exports.LogLevels.DEBUG); | ||
@@ -207,4 +208,5 @@ }; | ||
*/ | ||
Logger.prototype.info = function (logObject) { | ||
this.log('INFO: ', exports.LogLevels.INFO); | ||
Logger.prototype.info = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("INFO: " + message, exports.LogLevels.INFO); | ||
this.log(logObject, exports.LogLevels.INFO); | ||
@@ -216,4 +218,5 @@ }; | ||
*/ | ||
Logger.prototype.warn = function (logObject) { | ||
this.log('WARN: ', exports.LogLevels.WARN); | ||
Logger.prototype.warn = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("WARN: " + message, exports.LogLevels.WARN); | ||
this.log(logObject, exports.LogLevels.WARN); | ||
@@ -225,4 +228,5 @@ }; | ||
*/ | ||
Logger.prototype.error = function (logObject) { | ||
this.log('ERROR: ', exports.LogLevels.ERROR); | ||
Logger.prototype.error = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("ERROR: " + message, exports.LogLevels.ERROR); | ||
this.log(logObject, exports.LogLevels.ERROR); | ||
@@ -234,4 +238,5 @@ }; | ||
*/ | ||
Logger.prototype.fatal = function (logObject) { | ||
this.log('FATAL: ', exports.LogLevels.FATAL); | ||
Logger.prototype.fatal = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("FATAL: " + message, exports.LogLevels.FATAL); | ||
this.log(logObject, exports.LogLevels.FATAL); | ||
@@ -348,2 +353,5 @@ }; | ||
}; | ||
Utils.isString = function (obj) { | ||
return Object.prototype.toString.call(obj) === "[object String]"; | ||
}; | ||
/** | ||
@@ -350,0 +358,0 @@ * Sets a cookie value for given key. |
@@ -7,3 +7,3 @@ "use strict"; | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 00:51:58 | ||
* @LastEditTime: 2022-03-11 08:50:22 | ||
* @Descripttion: | ||
@@ -30,4 +30,5 @@ * @FilePath: \src\core\logger.ts | ||
*/ | ||
Logger.prototype.debug = function (logObject) { | ||
this.log('DEBUG: ', interfaces_1.LogLevels.DEBUG); | ||
Logger.prototype.debug = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("DEBUG: " + message, interfaces_1.LogLevels.DEBUG); | ||
this.log(logObject, interfaces_1.LogLevels.DEBUG); | ||
@@ -39,4 +40,5 @@ }; | ||
*/ | ||
Logger.prototype.info = function (logObject) { | ||
this.log('INFO: ', interfaces_1.LogLevels.INFO); | ||
Logger.prototype.info = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("INFO: " + message, interfaces_1.LogLevels.INFO); | ||
this.log(logObject, interfaces_1.LogLevels.INFO); | ||
@@ -48,4 +50,5 @@ }; | ||
*/ | ||
Logger.prototype.warn = function (logObject) { | ||
this.log('WARN: ', interfaces_1.LogLevels.WARN); | ||
Logger.prototype.warn = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("WARN: " + message, interfaces_1.LogLevels.WARN); | ||
this.log(logObject, interfaces_1.LogLevels.WARN); | ||
@@ -57,4 +60,5 @@ }; | ||
*/ | ||
Logger.prototype.error = function (logObject) { | ||
this.log('ERROR: ', interfaces_1.LogLevels.ERROR); | ||
Logger.prototype.error = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("ERROR: " + message, interfaces_1.LogLevels.ERROR); | ||
this.log(logObject, interfaces_1.LogLevels.ERROR); | ||
@@ -66,4 +70,5 @@ }; | ||
*/ | ||
Logger.prototype.fatal = function (logObject) { | ||
this.log('FATAL: ', interfaces_1.LogLevels.FATAL); | ||
Logger.prototype.fatal = function (logObject, message) { | ||
if (message === void 0) { message = ''; } | ||
this.log("FATAL: " + message, interfaces_1.LogLevels.FATAL); | ||
this.log(logObject, interfaces_1.LogLevels.FATAL); | ||
@@ -70,0 +75,0 @@ }; |
@@ -18,3 +18,3 @@ "use strict"; | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 00:29:26 | ||
* @LastEditTime: 2022-03-10 15:59:20 | ||
* @Descripttion: | ||
@@ -104,2 +104,5 @@ * @FilePath: \src\core\utils.ts | ||
}; | ||
Utils.isString = function (obj) { | ||
return Object.prototype.toString.call(obj) === "[object String]"; | ||
}; | ||
/** | ||
@@ -106,0 +109,0 @@ * Sets a cookie value for given key. |
@@ -6,3 +6,3 @@ "use strict"; | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-02-12 02:06:01 | ||
* @LastEditTime: 2022-03-11 08:49:46 | ||
* @Descripttion: | ||
@@ -9,0 +9,0 @@ * @FilePath: \src\interfaces\interfaces.ts |
@@ -9,3 +9,3 @@ import { ILogger, LogLevels } from '../interfaces/interfaces'; | ||
*/ | ||
debug(logObject: any): void; | ||
debug(logObject: any, message?: string): void; | ||
/** | ||
@@ -15,3 +15,3 @@ * @description: 输出信息日志 | ||
*/ | ||
info(logObject: any): void; | ||
info(logObject: any, message?: string): void; | ||
/** | ||
@@ -21,3 +21,3 @@ * @description: 输出警告日志 | ||
*/ | ||
warn(logObject: any): void; | ||
warn(logObject: any, message?: string): void; | ||
/** | ||
@@ -27,3 +27,3 @@ * @description: 输出错误日志 | ||
*/ | ||
error(logObject: any): void; | ||
error(logObject: any, message?: string): void; | ||
/** | ||
@@ -33,3 +33,3 @@ * @description: 输出致命错误日志 | ||
*/ | ||
fatal(logObject: any): void; | ||
fatal(logObject: any, message?: string): void; | ||
} |
@@ -13,2 +13,3 @@ import { ExecOptons } from '../interfaces/interfaces'; | ||
static isFunction(obj: any): boolean; | ||
static isString(obj: any): boolean; | ||
/** | ||
@@ -15,0 +16,0 @@ * Sets a cookie value for given key. |
@@ -34,7 +34,7 @@ export declare class ExecOptons { | ||
level: LogLevels; | ||
debug(logObject: any): void; | ||
info(logObject: any): void; | ||
warn(logObject: any): void; | ||
error(logObject: any): void; | ||
fatal(logObject: any): void; | ||
debug(logObject: any, message: string): void; | ||
info(logObject: any, message: string): void; | ||
warn(logObject: any, message: string): void; | ||
error(logObject: any, message: string): void; | ||
fatal(logObject: any, message: string): void; | ||
} |
{ | ||
"name": "@icreate/core", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Ics核心包封装", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149356
1881