@vercube/logger 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/dist/Drivers/ConsoleProvider.mjs +2 -2
- package/dist/Drivers/JsonProvider.mjs +1 -1
- package/dist/index.mjs +11 -41
- package/package.json +2 -2
- /package/dist/{LoggerProvider-DMxXOscV.mjs → LoggerProvider-pLewpQcY.mjs} +0 -0
- /package/dist/{Utils-5578ynXS.mjs → Utils-48kYG6c9.mjs} +0 -0
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<br>
|
|
4
4
|
<br>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
# Vercube
|
|
7
|
+
|
|
8
|
+
Next generation HTTP framework
|
|
9
|
+
|
|
10
10
|
<a href="https://www.npmjs.com/package/@vercube/logger">
|
|
11
11
|
<img src="https://img.shields.io/npm/v/%40vercube%2Flogger?style=for-the-badge&logo=npm&color=%23767eff" alt="npm"/>
|
|
12
12
|
</a>
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
<a href="https://github.com/vercube/vercube/blob/main/LICENSE" target="_blank">
|
|
17
17
|
<img src="https://img.shields.io/npm/l/%40vercube%2Flogger?style=for-the-badge&color=%23767eff" alt="License"/>
|
|
18
18
|
</a>
|
|
19
|
+
<a href="https://codecov.io/gh/vercube/vercube" target="_blank">
|
|
20
|
+
<img src="https://img.shields.io/codecov/c/github/vercube/vercube?style=for-the-badge&color=%23767eff" alt="Coverage"/>
|
|
21
|
+
</a>
|
|
19
22
|
<br/>
|
|
20
23
|
<br/>
|
|
21
24
|
</div>
|
|
@@ -23,9 +26,9 @@
|
|
|
23
26
|
An ultra-efficient JavaScript server framework that runs anywhere - Node.js, Bun, or Deno - with unmatched flexibility and complete configurability for developers who refuse to sacrifice speed or control.
|
|
24
27
|
|
|
25
28
|
## <a name="module">Logger Module</a>
|
|
26
|
-
The Logger module provides a flexible and powerful logging system for Vercube applications. It offers structured logging with multiple transport options, log levels, and formatting capabilities. The module is designed to be highly configurable and extensible, allowing developers to easily integrate custom logging solutions while maintaining a consistent logging interface across their application.
|
|
27
|
-
|
|
28
29
|
|
|
30
|
+
The Logger module provides a flexible and powerful logging system for Vercube applications. It offers structured logging with multiple transport options, log levels, and formatting capabilities. The module is designed to be highly configurable and extensible, allowing developers to easily integrate custom logging solutions while maintaining a consistent logging interface across their application.
|
|
29
31
|
|
|
30
32
|
## <a name="documentation">📖 Documentation</a>
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
Comprehensive documentation is available at [vercube.dev](https://vercube.dev). There you'll find detailed module descriptions, project information, guides, and everything else you need to know about Vercube.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { LoggerProvider } from "../LoggerProvider-pLewpQcY.mjs";
|
|
2
|
+
import { LOG_LEVEL_COLORS } from "../Utils-48kYG6c9.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/Drivers/ConsoleProvider.ts
|
|
5
5
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "
|
|
1
|
+
import "./LoggerProvider-pLewpQcY.mjs";
|
|
2
|
+
import { colors, isLogLevelEnabled } from "./Utils-48kYG6c9.mjs";
|
|
3
3
|
import { Container, Inject } from "@vercube/di";
|
|
4
4
|
|
|
5
|
-
//#region rolldown:runtime
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __commonJS = (cb, mod) => function() {
|
|
13
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
17
|
-
key = keys[i];
|
|
18
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
-
get: ((k) => from[k]).bind(null, key),
|
|
20
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: true
|
|
28
|
-
}) : target, mod));
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
5
|
//#region src/Common/Logger.ts
|
|
32
6
|
/**
|
|
33
7
|
* Abstract base class for implementing logging services.
|
|
@@ -37,20 +11,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
37
11
|
var Logger = class {};
|
|
38
12
|
|
|
39
13
|
//#endregion
|
|
40
|
-
//#region
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
module.exports = __decorate, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
49
|
-
}) });
|
|
14
|
+
//#region \0@oxc-project+runtime@0.90.0/helpers/decorate.js
|
|
15
|
+
function __decorate(decorators, target, key, desc) {
|
|
16
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
}
|
|
50
21
|
|
|
51
22
|
//#endregion
|
|
52
23
|
//#region src/Service/BaseLogger.ts
|
|
53
|
-
var import_decorate = /* @__PURE__ */ __toESM(require_decorate(), 1);
|
|
54
24
|
var BaseLogger = class {
|
|
55
25
|
gContainer;
|
|
56
26
|
/**
|
|
@@ -68,7 +38,7 @@ var BaseLogger = class {
|
|
|
68
38
|
fProvidersLevel = /* @__PURE__ */ new Map();
|
|
69
39
|
/**
|
|
70
40
|
* Configure logger
|
|
71
|
-
* @param options
|
|
41
|
+
* @param options
|
|
72
42
|
*/
|
|
73
43
|
configure(options) {
|
|
74
44
|
this.fLogLevel = options?.logLevel ?? "debug";
|
|
@@ -141,7 +111,7 @@ var BaseLogger = class {
|
|
|
141
111
|
for (const [, provider] of providersToProcess) provider.processMessage(message);
|
|
142
112
|
}
|
|
143
113
|
};
|
|
144
|
-
(
|
|
114
|
+
__decorate([Inject(Container)], BaseLogger.prototype, "gContainer", void 0);
|
|
145
115
|
|
|
146
116
|
//#endregion
|
|
147
117
|
export { BaseLogger, Logger, colors, isLogLevelEnabled };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/logger",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "Logger module for Vercube framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@vercube/di": "0.0.
|
|
27
|
+
"@vercube/di": "0.0.24"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
File without changes
|
|
File without changes
|