koatty_logger
Advanced tools
Comparing version 1.3.6 to 1.3.8
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.3.8](https://github.com/thinkkoa/koatty_logger/compare/v1.3.6...v1.3.8) (2021-12-21) | ||
### [1.3.6](https://github.com/thinkkoa/koatty_logger/compare/v1.3.5...v1.3.6) (2021-12-20) | ||
@@ -7,0 +9,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2021-12-20 11:33:29 | ||
* @Date: 2021-12-21 11:22:47 | ||
* @License: BSD (3-Clause) | ||
@@ -11,23 +11,2 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
/** | ||
* GetLogger | ||
* | ||
* @export | ||
* @param {{ | ||
* logLevel?: LogLevelType; | ||
* logConsole?: boolean; | ||
* logFile?: boolean; | ||
* logFileLevel?: LogLevelType; | ||
* logFilePath?: string; | ||
* }} opt | ||
* @returns {*} | ||
*/ | ||
export declare function GetLogger(opt: { | ||
logLevel?: LogLevelType; | ||
logConsole?: boolean; | ||
logFile?: boolean; | ||
logFileLevel?: LogLevelType; | ||
logFilePath?: string; | ||
}): Logger; | ||
/** | ||
* Logger interface | ||
@@ -224,11 +203,2 @@ * | ||
/** | ||
* SetLogger | ||
* | ||
* @export | ||
* @param {ILogger} logger | ||
* @returns {*} | ||
*/ | ||
export declare function SetLogger(logger: ILogger): Logger; | ||
export { } |
/*! | ||
* @Author: richen | ||
* @Date: 2021-12-20 11:33:16 | ||
* @Date: 2021-12-21 11:22:37 | ||
* @License: BSD (3-Clause) | ||
@@ -435,47 +435,8 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
* @Date: 2021-12-18 20:03:31 | ||
* @LastEditTime: 2021-12-20 11:21:42 | ||
* @LastEditTime: 2021-12-21 11:19:20 | ||
*/ | ||
/** | ||
* DefaultLogger | ||
*/ | ||
let defaultLogger = new Logger(); | ||
/** | ||
* GetLogger | ||
* | ||
* @export | ||
* @param {{ | ||
* logLevel?: LogLevelType; | ||
* logConsole?: boolean; | ||
* logFile?: boolean; | ||
* logFileLevel?: LogLevelType; | ||
* logFilePath?: string; | ||
* }} opt | ||
* @returns {*} | ||
*/ | ||
function GetLogger(opt) { | ||
if (opt === undefined) { | ||
return defaultLogger; | ||
} | ||
const logger = new Logger(opt); | ||
return logger; | ||
} | ||
/** | ||
* SetLogger | ||
* | ||
* @export | ||
* @param {ILogger} logger | ||
* @returns {*} | ||
*/ | ||
function SetLogger(logger) { | ||
if (logger) { | ||
defaultLogger = logger; | ||
} | ||
return defaultLogger; | ||
} | ||
//DefaultLogger | ||
const DefaultLogger = defaultLogger; | ||
const DefaultLogger = new Logger(); | ||
exports.DefaultLogger = DefaultLogger; | ||
exports.GetLogger = GetLogger; | ||
exports.Logger = Logger; | ||
exports.SetLogger = SetLogger; |
{ | ||
"name": "koatty_logger", | ||
"version": "1.3.6", | ||
"version": "1.3.8", | ||
"description": "Logger for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,9 +13,2 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
## Functions | ||
| Function | Description | | ||
| --- | --- | | ||
| [GetLogger(opt)](./koatty_logger.getlogger.md) | GetLogger | | ||
| [SetLogger(logger)](./koatty_logger.setlogger.md) | SetLogger | | ||
## Interfaces | ||
@@ -22,0 +15,0 @@ |
{ | ||
"name": "koatty_logger", | ||
"version": "1.3.6", | ||
"version": "1.3.8", | ||
"description": "Logger for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
1846777
49
1637