Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koatty_logger

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_logger - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

docs/api/koatty_logger.ilogger.getlevel.md

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.3.5](https://github.com/thinkkoa/koatty_logger/compare/v1.3.4...v1.3.5) (2021-12-20)
### [1.3.4](https://github.com/thinkkoa/koatty_logger/compare/v1.3.2...v1.3.4) (2021-12-18)

@@ -7,0 +9,0 @@

58

dist/index.d.ts
/*!
* @Author: richen
* @Date: 2021-12-18 21:24:34
* @Date: 2021-12-20 11:31:30
* @License: BSD (3-Clause)

@@ -8,3 +8,3 @@ * @Copyright (c) - <richenlin(at)gmail.com>

*/
export declare const DefaultLogger: ILogger;
export declare const DefaultLogger: Logger;

@@ -30,3 +30,3 @@ /**

logFilePath?: string;
}): ILogger;
}): Logger;

@@ -41,2 +41,10 @@ /**

/**
* getLevel
*/
getLevel(): LogLevelType;
/**
* setLevel
*/
setLevel(level: LogLevelType): void;
/**
* log Debug

@@ -106,3 +114,3 @@ *

*/
getLevel(): string;
getLevel(): LogLevelType;
/**

@@ -113,42 +121,2 @@ * setLevel

/**
* getLogConsole
*/
getLogConsole(): boolean;
/**
* setLogConsole
*/
setLogConsole(t: boolean): void;
/**
* getLogFile
*/
getLogFile(): boolean;
/**
* setLogFile
*/
setLogFile(t: boolean): void;
/**
* getLogFileLevel
*/
getLogFileLevel(): string;
/**
* setLogFileLevel
*/
setLogFileLevel(level: LogLevelType): void;
/**
* getLogFilePath
*/
getLogFilePath(): string;
/**
* setLogPath
*/
setLogFilePath(path: string): void;
/**
* getSensFields
*/
getSensFields(): Set<string>;
/**
* setSensFields
*/
setSensFields(fields: string[]): void;
/**
* 格式化

@@ -267,4 +235,4 @@ *

*/
export declare function SetLogger(logger: ILogger): ILogger;
export declare function SetLogger(logger: ILogger): Logger;
export { }
/*!
* @Author: richen
* @Date: 2021-12-18 21:24:24
* @Date: 2021-12-20 11:31:20
* @License: BSD (3-Clause)

@@ -135,3 +135,3 @@ * @Copyright (c) - <richenlin(at)gmail.com>

* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-12-18 20:31:47
* @LastEditTime: 2021-12-20 11:29:38
* @License: BSD (3-Clause)

@@ -232,62 +232,2 @@ * @Copyright (c) - <richenlin(at)gmail.com>

/**
* getLogConsole
*/
getLogConsole() {
return this.logConsole;
}
/**
* setLogConsole
*/
setLogConsole(t) {
this.logConsole = t;
}
/**
* getLogFile
*/
getLogFile() {
return this.logFile;
}
/**
* setLogFile
*/
setLogFile(t) {
this.logFile = t;
}
/**
* getLogFileLevel
*/
getLogFileLevel() {
return this.logFileLevel;
}
/**
* setLogFileLevel
*/
setLogFileLevel(level) {
this.logFileLevel = level;
}
/**
* getLogFilePath
*/
getLogFilePath() {
return this.logFilePath;
}
/**
* setLogPath
*/
setLogFilePath(path) {
this.logFilePath = path;
}
/**
* getSensFields
*/
getSensFields() {
return this.sensFields;
}
/**
* setSensFields
*/
setSensFields(fields) {
this.sensFields = new Set([...this.sensFields, ...fields]);
}
/**
* 格式化

@@ -336,3 +276,3 @@ *

// print console
if (this.getLogConsole()) {
if (this.logConsole) {
args = this.format(level, name, args);

@@ -345,3 +285,3 @@ formatted = true;

// record log files
if (this.getLogFile()) {
if (this.logFile) {
this.writeLogFile(level, name, args, formatted);

@@ -368,3 +308,3 @@ }

name = name !== '' ? name.toUpperCase() : level;
const logFilePath = this.getLogFilePath();
const logFilePath = this.logFilePath;
if (!helper__namespace.isDir(logFilePath)) {

@@ -500,3 +440,3 @@ await helper__namespace.mkDir(logFilePath);

* @Date: 2021-12-18 20:03:31
* @LastEditTime: 2021-12-18 21:15:52
* @LastEditTime: 2021-12-20 11:21:42
*/

@@ -503,0 +443,0 @@ /**

{
"name": "koatty_logger",
"version": "1.3.4",
"version": "1.3.5",
"description": "Logger for koatty.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -10,3 +10,3 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

```typescript
DefaultLogger: ILogger
DefaultLogger: Logger
```

@@ -19,3 +19,3 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

logFilePath?: string;
}): ILogger;
}): Logger;
```

@@ -31,5 +31,5 @@

[ILogger](./koatty_logger.ilogger.md)
[Logger](./koatty_logger.logger.md)
{<!-- -->\*<!-- -->}

@@ -23,2 +23,3 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

| [Error(args)](./koatty_logger.ilogger.error.md) | log Error |
| [getLevel()](./koatty_logger.ilogger.getlevel.md) | getLevel |
| [Info(args)](./koatty_logger.ilogger.info.md) | log Info |

@@ -28,3 +29,4 @@ | [Log(msg)](./koatty_logger.ilogger.log.md) | log Custom<!-- -->Logger.Log('msg')<!-- -->Logger.Log('name', 'msg')<!-- -->Logger.Log('name', 'color', 'msg')<!-- -->Logger.Log('name', 'color', 'msg1', 'msg2'...) |

| [Log(name, color, msg)](./koatty_logger.ilogger.log_2.md) | |
| [setLevel(level)](./koatty_logger.ilogger.setlevel.md) | setLevel |
| [Warn(args)](./koatty_logger.ilogger.warn.md) | log Warn |

@@ -12,7 +12,7 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

```typescript
getLevel(): string;
getLevel(): LogLevelType;
```
<b>Returns:</b>
string
[LogLevelType](./koatty_logger.logleveltype.md)

@@ -32,15 +32,5 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

| [getLevel()](./koatty_logger.logger.getlevel.md) | | getLevel |
| [getLogConsole()](./koatty_logger.logger.getlogconsole.md) | | getLogConsole |
| [getLogFile()](./koatty_logger.logger.getlogfile.md) | | getLogFile |
| [getLogFileLevel()](./koatty_logger.logger.getlogfilelevel.md) | | getLogFileLevel |
| [getLogFilePath()](./koatty_logger.logger.getlogfilepath.md) | | getLogFilePath |
| [getSensFields()](./koatty_logger.logger.getsensfields.md) | | getSensFields |
| [Info(args)](./koatty_logger.logger.info.md) | | log Info |
| [Log(args)](./koatty_logger.logger.log.md) | | log Log<!-- -->Logger.Log('msg')<!-- -->Logger.Log('name', 'msg')<!-- -->Logger.Log('name', 'color', 'msg')<!-- -->Logger.Log('name', 'color', 'msg1', 'msg2'...) |
| [setLevel(level)](./koatty_logger.logger.setlevel.md) | | setLevel |
| [setLogConsole(t)](./koatty_logger.logger.setlogconsole.md) | | setLogConsole |
| [setLogFile(t)](./koatty_logger.logger.setlogfile.md) | | setLogFile |
| [setLogFileLevel(level)](./koatty_logger.logger.setlogfilelevel.md) | | setLogFileLevel |
| [setLogFilePath(path)](./koatty_logger.logger.setlogfilepath.md) | | setLogPath |
| [setSensFields(fields)](./koatty_logger.logger.setsensfields.md) | | setSensFields |
| [Success(args)](./koatty_logger.logger.success.md) | | log Success |

@@ -47,0 +37,0 @@ | [Warn(args)](./koatty_logger.logger.warn.md) | | log Warn |

@@ -13,3 +13,3 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

```typescript
export declare function SetLogger(logger: ILogger): ILogger;
export declare function SetLogger(logger: ILogger): Logger;
```

@@ -25,5 +25,5 @@

[ILogger](./koatty_logger.ilogger.md)
[Logger](./koatty_logger.logger.md)
{<!-- -->\*<!-- -->}
{
"name": "koatty_logger",
"version": "1.3.4",
"version": "1.3.5",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc