@geeko/log 1.3.0 → 1.3.1
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.
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { LogConstructorOptions } from "../types/LogConstructorOptions";
|
|
2
|
-
export declare const CLI_SHIFT_UP: string;
|
|
3
|
-
export declare const CLI_CLEAR_LINE: string;
|
|
4
2
|
export declare class LogService {
|
|
5
3
|
constructor(options?: LogConstructorOptions);
|
|
6
4
|
private _title;
|
|
@@ -11,7 +9,7 @@ export declare class LogService {
|
|
|
11
9
|
info(message: string): void;
|
|
12
10
|
warn(message: string): void;
|
|
13
11
|
verbose(message: string): void;
|
|
14
|
-
error(error: Error |
|
|
12
|
+
error(error: Error | any): void;
|
|
15
13
|
debug(message: string): void;
|
|
16
14
|
format(formatter: any): void;
|
|
17
15
|
getMetadata(): object;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogService =
|
|
3
|
+
exports.LogService = void 0;
|
|
4
4
|
const logger_1 = require("../tools/logger");
|
|
5
5
|
const ConsoleTransport_1 = require("../transports/ConsoleTransport");
|
|
6
6
|
const winston_1 = require("winston");
|
|
7
|
-
exports.CLI_SHIFT_UP = "\x1B[1A";
|
|
8
|
-
exports.CLI_CLEAR_LINE = "\x1B[2K";
|
|
9
7
|
class LogService {
|
|
10
8
|
constructor(options) {
|
|
11
9
|
this._logger =
|
|
@@ -41,9 +39,9 @@ class LogService {
|
|
|
41
39
|
if (!error) {
|
|
42
40
|
return void 0;
|
|
43
41
|
}
|
|
44
|
-
this._logger.error(typeof error === "string"
|
|
45
|
-
? error
|
|
46
|
-
: error
|
|
42
|
+
this._logger.error(typeof error.message === "string"
|
|
43
|
+
? error.message
|
|
44
|
+
: String(error), this.getMetadata());
|
|
47
45
|
}
|
|
48
46
|
debug(message) {
|
|
49
47
|
this._logger.debug(message, this.getMetadata());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geeko/log",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"directories": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"homepage": "https://github.com/Metwas/geeko-log#readme",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"chalk": "4.1.2",
|
|
26
|
-
"sonic-boom": "^4.2.
|
|
26
|
+
"sonic-boom": "^4.2.1",
|
|
27
27
|
"winston": "^3.19.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^20.19.
|
|
30
|
+
"@types/node": "^20.19.33",
|
|
31
31
|
"typescript": "^5.9.3"
|
|
32
32
|
}
|
|
33
33
|
}
|