@edirect/logger 11.0.44 → 11.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edirect/logger",
3
- "version": "11.0.44",
3
+ "version": "11.0.45",
4
4
  "packageScope": "@edirect",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "pino": "10.3.0",
22
22
  "supertest": "7.2.2",
23
23
  "tslib": "^2.8.1",
24
- "@edirect/config": "11.0.44"
24
+ "@edirect/config": "11.0.45"
25
25
  },
26
26
  "nx": {
27
27
  "name": "@edirect/logger",
package/dist/README.md DELETED
@@ -1,96 +0,0 @@
1
- # @edirect/logger
2
-
3
- Advanced logging module for Edirect applications. Provides structured, multi-level logging with support for file output, async configuration, and integration with NestJS and Edirect config modules.
4
-
5
- ## Features
6
-
7
- - Multi-level logging (log, info, warn, error, debug, verbose)
8
- - File and console output
9
- - Async configuration with ConfigService
10
- - Integrates with NestJS
11
-
12
- ## Installation
13
-
14
- ```bash
15
- npm install @edirect/logger
16
- ```
17
-
18
- ## Usage
19
-
20
- Register LoggerModule in your AppModule:
21
-
22
- ```typescript
23
- import { LoggerModule } from '@edirect/logger';
24
-
25
- @Module({
26
- imports: [
27
- LoggerModule.register({
28
- output: 'output',
29
- logs: {
30
- errorFile: 'error_file',
31
- warningFile: 'warning_file',
32
- infoFile: 'info_file',
33
- },
34
- name: 'subscription-service',
35
- }),
36
- ],
37
- })
38
- export class AppModule {}
39
- ```
40
-
41
- Or use async configuration:
42
-
43
- ```typescript
44
- import { ConfigService } from '@edirect/config';
45
-
46
- @Module({
47
- imports: [
48
- LoggerModule.registerAsync({
49
- imports: [ConfigModule],
50
- useFactory: async (configService: ConfigService) => ({
51
- output: configService.get(Variables.LOGS_OUTPUT),
52
- logs: {
53
- errorFile: configService.get(Variables.LOGS_ERROR_FILE),
54
- warningFile: configService.get(Variables.LOGS_WARNING_FILE),
55
- infoFile: configService.get(Variables.LOGS_INFO_FILE),
56
- },
57
- name: 'subscription-service',
58
- }),
59
- inject: [ConfigService],
60
- }),
61
- ],
62
- })
63
- export class AppModule {}
64
- ```
65
-
66
- Inject LoggerService and use logging methods:
67
-
68
- ```typescript
69
- constructor(private loggerService: LoggerService) {}
70
-
71
- this.loggerService.log('message', payload);
72
- this.loggerService.info('message', payload);
73
- this.loggerService.warn('message', payload);
74
- this.loggerService.error('message', trace);
75
- this.loggerService.debug('message');
76
- this.loggerService.verbose('message');
77
- ```
78
-
79
- Inject the LoggerService where needed:
80
-
81
- ```typescript
82
- constructor(
83
- private loggerService: LoggerService
84
- ) {}
85
- ```
86
-
87
- Log using the exposed methods:
88
-
89
- ```typescript
90
- this.loggerService.log(message: string, payload?: string)
91
- this.loggerService.info(message: string, payload?: string)
92
- this.loggerService.warn(message: string, payload: string)
93
- this.loggerService.error(message: string, trace: string)
94
- this.loggerService.debug(message: string)
95
- this.loggerService.verbose(message: string)
96
- ```
package/dist/package.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "name": "@edirect/logger",
3
- "version": "11.0.43",
4
- "main": "./dist/src/index.js",
5
- "types": "./dist/src/index.d.ts",
6
- "exports": {
7
- ".": {
8
- "import": "./dist/src/index.js",
9
- "default": "./dist/src/index.js",
10
- "require": "./dist/src/index.js",
11
- "types": "./dist/src/index.d.ts"
12
- },
13
- "./package.json": "./package.json"
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "dependencies": {
19
- "@edirect/config": "^11.0.43",
20
- "@nestjs/common": "^11.1.12",
21
- "pino": "10.3.0",
22
- "supertest": "7.2.2",
23
- "tslib": "^2.8.1"
24
- },
25
- "type": "commonjs"
26
- }
@@ -1,4 +0,0 @@
1
- export * from './logger/logger.class';
2
- export * from './logger/logger.module';
3
- export * from './logger/logger.service';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
package/dist/src/index.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./logger/logger.class"), exports);
5
- tslib_1.__exportStar(require("./logger/logger.module"), exports);
6
- tslib_1.__exportStar(require("./logger/logger.service"), exports);
@@ -1,16 +0,0 @@
1
- import { Level } from 'pino';
2
- export interface LoggerModuleOptions {
3
- output?: string;
4
- logs?: {
5
- errorFile: string;
6
- warningFile: string;
7
- infoFile: string;
8
- exceptionsFile?: string;
9
- };
10
- name?: string;
11
- host?: string;
12
- protocol?: string;
13
- version?: string;
14
- level?: Level;
15
- }
16
- //# sourceMappingURL=logger-module-options.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger-module-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/logger/interfaces/logger-module-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +0,0 @@
1
- import { LoggerModuleOptions } from './interfaces/logger-module-options.interface';
2
- export interface LogMetadata {
3
- 'remote-address': string;
4
- sessionId: string;
5
- quoteId: string;
6
- payload?: any;
7
- }
8
- export declare class Logger {
9
- private sessionId;
10
- private quoteId;
11
- private configs;
12
- private logger;
13
- constructor(env: Record<string, string>, options?: LoggerModuleOptions);
14
- debug(message: string, payload?: any, remoteAddress?: string): void;
15
- info(message: string, payload?: any, remoteAddress?: string): void;
16
- warning(message: string, payload?: any, remoteAddress?: string): void;
17
- warn(message: string, payload?: any, remoteAddress?: string): void;
18
- error(message: string, payload?: any, remoteAddress?: string): void;
19
- verbose(message: string, remoteAddress?: string): void;
20
- setSessionId(sessionId: string): void;
21
- setQuoteId(quoteId: string): void;
22
- private buildLog;
23
- }
24
- //# sourceMappingURL=log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/logger/log.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAEjB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAyGtE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAInE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAIlE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAIrE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAIlE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAInE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAItD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,OAAO,CAAC,QAAQ;CAQjB"}
@@ -1,136 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logger = void 0;
4
- const tslib_1 = require("tslib");
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- const pino_1 = tslib_1.__importStar(require("pino"));
7
- class Logger {
8
- sessionId = '';
9
- quoteId = '';
10
- configs;
11
- logger;
12
- constructor(env, options) {
13
- const defaults = {
14
- logs: {
15
- infoFile: env.LOGS_INFO_FILE,
16
- warningFile: env.LOGS_WARNING_FILE,
17
- errorFile: env.LOGS_ERROR_FILE,
18
- exceptionsFile: env.LOGS_EXCEPTIONS_FILE,
19
- },
20
- level: env.LOGS_LEVEL?.toLowerCase() || 'info',
21
- output: env.LOGS_OUTPUT ?? 'console',
22
- name: env.npm_package_name ?? env.APP_NAME ?? 'app',
23
- version: env.npm_package_version ?? env.APP_VERSION ?? '0.0.0',
24
- host: env.LOGS_HOST ?? '0.0.0.0',
25
- protocol: env.LOGS_PROTOCOL ?? 'http',
26
- };
27
- this.configs = { ...defaults, ...options };
28
- const streams = [];
29
- if (this.configs.output === 'file' || this.configs.output === 'both') {
30
- if (this.configs.logs?.infoFile) {
31
- streams.push({
32
- level: 'info',
33
- stream: pino_1.default.destination({
34
- dest: this.configs.logs.infoFile,
35
- mkdir: true,
36
- sync: false,
37
- }),
38
- });
39
- }
40
- if (this.configs.logs?.warningFile) {
41
- streams.push({
42
- level: 'warn',
43
- stream: pino_1.default.destination({
44
- dest: this.configs.logs.warningFile,
45
- mkdir: true,
46
- sync: false,
47
- }),
48
- });
49
- }
50
- if (this.configs.logs?.errorFile) {
51
- streams.push({
52
- level: 'error',
53
- stream: pino_1.default.destination({
54
- dest: this.configs.logs.errorFile,
55
- mkdir: true,
56
- sync: false,
57
- }),
58
- });
59
- }
60
- }
61
- if (this.configs.output === 'console' || this.configs.output === 'both') {
62
- streams.push({
63
- level: this.configs.level,
64
- stream: process.stdout,
65
- });
66
- }
67
- this.logger = (0, pino_1.default)({
68
- level: this.configs.level,
69
- timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
70
- messageKey: 'message',
71
- errorKey: 'error',
72
- base: {
73
- name: this.configs.name,
74
- version: this.configs.version,
75
- host: this.configs.host,
76
- protocol: this.configs.protocol,
77
- },
78
- formatters: {
79
- level: label => ({ level: label }),
80
- },
81
- }, (0, pino_1.multistream)(streams));
82
- if (this.configs.logs?.exceptionsFile) {
83
- const exceptionLogger = (0, pino_1.default)({
84
- level: 'fatal',
85
- timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
86
- messageKey: 'message',
87
- errorKey: 'error',
88
- }, pino_1.default.destination({
89
- dest: this.configs.logs.exceptionsFile,
90
- mkdir: true,
91
- sync: true,
92
- }));
93
- process.on('uncaughtException', err => {
94
- exceptionLogger.fatal({ err }, 'Uncaught exception');
95
- process.exit(1);
96
- });
97
- process.on('unhandledRejection', reason => {
98
- exceptionLogger.fatal({ reason }, 'Unhandled rejection');
99
- process.exit(1);
100
- });
101
- }
102
- }
103
- debug(message, payload, remoteAddress) {
104
- this.logger.debug(this.buildLog(payload, remoteAddress), message);
105
- }
106
- info(message, payload, remoteAddress) {
107
- this.logger.info(this.buildLog(payload, remoteAddress), message);
108
- }
109
- warning(message, payload, remoteAddress) {
110
- this.logger.warn(this.buildLog(payload, remoteAddress), message);
111
- }
112
- warn(message, payload, remoteAddress) {
113
- this.warning(message, payload, remoteAddress);
114
- }
115
- error(message, payload, remoteAddress) {
116
- this.logger.error(this.buildLog(payload, remoteAddress), message);
117
- }
118
- verbose(message, remoteAddress) {
119
- this.info(message, remoteAddress);
120
- }
121
- setSessionId(sessionId) {
122
- this.sessionId = sessionId;
123
- }
124
- setQuoteId(quoteId) {
125
- this.quoteId = quoteId;
126
- }
127
- buildLog(payload, remoteAddress = '') {
128
- return {
129
- sessionId: this.sessionId,
130
- quoteId: this.quoteId,
131
- 'remote-address': remoteAddress,
132
- payload,
133
- };
134
- }
135
- }
136
- exports.Logger = Logger;
@@ -1,16 +0,0 @@
1
- import { LoggerService } from '@nestjs/common';
2
- import { LoggerModuleOptions } from './interfaces/logger-module-options.interface';
3
- import { Logger as LoggerImpl } from './log';
4
- export declare class Logger implements LoggerService {
5
- private logger;
6
- constructor(env: Record<string, string>, clientConfigs?: LoggerModuleOptions, logger?: LoggerImpl);
7
- setSessionId(sessionId: string): void;
8
- setQuoteId(quoteId: string): void;
9
- log(message: string, payload?: string): void;
10
- info(message: string, payload?: string): void;
11
- error(message: string, trace: unknown): void;
12
- warn(message: string, payload?: string): void;
13
- debug(message: string): void;
14
- verbose(message: string): void;
15
- }
16
- //# sourceMappingURL=logger.class.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.class.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7C,qBAAa,MAAO,YAAW,aAAa;IAIxC,OAAO,CAAC,MAAM;gBAFd,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,aAAa,CAAC,EAAE,mBAAmB,EAC3B,MAAM,aAAqC;IAGrD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAI5C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG/B"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logger = void 0;
4
- const log_1 = require("./log");
5
- class Logger {
6
- logger;
7
- constructor(env, clientConfigs, logger = new log_1.Logger(env, clientConfigs)) {
8
- this.logger = logger;
9
- }
10
- setSessionId(sessionId) {
11
- this.logger.setSessionId(sessionId);
12
- }
13
- setQuoteId(quoteId) {
14
- this.logger.setQuoteId(quoteId);
15
- }
16
- log(message, payload) {
17
- this.logger.info(message, payload || '');
18
- }
19
- info(message, payload) {
20
- this.logger.info(message, payload || '');
21
- }
22
- error(message, trace) {
23
- this.logger.error(message, trace);
24
- }
25
- warn(message, payload) {
26
- this.logger.warn(message, payload || '');
27
- }
28
- debug(message) {
29
- this.logger.debug(message);
30
- }
31
- verbose(message) {
32
- this.logger.verbose(message);
33
- }
34
- }
35
- exports.Logger = Logger;
@@ -1,7 +0,0 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- import { ConfigurableModuleClass, ASYNC_OPTIONS_TYPE, OPTIONS_TYPE } from './logger.module.definition';
3
- export declare class LoggerModule extends ConfigurableModuleClass {
4
- static register(options: typeof OPTIONS_TYPE): DynamicModule;
5
- static registerAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule;
6
- }
7
- //# sourceMappingURL=logger.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.module.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAI/D,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACb,MAAM,4BAA4B,CAAC;AAGpC,qBAKa,YAAa,SAAQ,uBAAuB;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,YAAY,GAAG,aAAa;IAM5D,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,kBAAkB,GAAG,aAAa;CAKxE"}
@@ -1,3 +0,0 @@
1
- import { LoggerModuleOptions } from './interfaces/logger-module-options.interface';
2
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<LoggerModuleOptions, "register", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol, OPTIONS_TYPE: LoggerModuleOptions & Partial<{}>, ASYNC_OPTIONS_TYPE: import("@nestjs/common").ConfigurableModuleAsyncOptions<LoggerModuleOptions, "create"> & Partial<{}>;
3
- //# sourceMappingURL=logger.module.definition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.module.definition.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.module.definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,eAAO,MACL,uBAAuB,iGACvB,oBAAoB,mBACpB,YAAY,qCACZ,kBAAkB,sGAC4C,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ASYNC_OPTIONS_TYPE = exports.OPTIONS_TYPE = exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
5
- const common_1 = require("@nestjs/common");
6
- _a = new common_1.ConfigurableModuleBuilder().build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN, exports.OPTIONS_TYPE = _a.OPTIONS_TYPE, exports.ASYNC_OPTIONS_TYPE = _a.ASYNC_OPTIONS_TYPE;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LoggerModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const common_1 = require("@nestjs/common");
6
- const config_1 = require("@edirect/config");
7
- const logger_service_1 = require("./logger.service");
8
- const logger_module_definition_1 = require("./logger.module.definition");
9
- // TODO For TODO changes check the documentation: https://docs.nestjs.com/fundamentals/dynamic-modules
10
- let LoggerModule = class LoggerModule extends logger_module_definition_1.ConfigurableModuleClass {
11
- static register(options) {
12
- return {
13
- ...super.register(options),
14
- };
15
- }
16
- static registerAsync(options) {
17
- return {
18
- ...super.registerAsync(options),
19
- };
20
- }
21
- };
22
- exports.LoggerModule = LoggerModule;
23
- exports.LoggerModule = LoggerModule = tslib_1.__decorate([
24
- (0, common_1.Global)(),
25
- (0, common_1.Module)({
26
- providers: [logger_service_1.LoggerService, config_1.ConfigService],
27
- exports: [logger_service_1.LoggerService],
28
- })
29
- ], LoggerModule);
@@ -1,17 +0,0 @@
1
- import { ConfigService } from '@edirect/config';
2
- import type { LoggerModuleOptions } from './interfaces/logger-module-options.interface';
3
- export declare class LoggerService {
4
- private readonly configService;
5
- private options?;
6
- private readonly logger;
7
- constructor(configService: ConfigService, options?: LoggerModuleOptions | undefined);
8
- setSessionId(sessionId: string): void;
9
- setQuoteId(quoteId: string): void;
10
- log(message: string, payload?: string): void;
11
- info(message: string, payload?: string): void;
12
- error(message: string, trace: string): void;
13
- warn(message: string, payload?: string): void;
14
- debug(message: string): void;
15
- verbose(message: string): void;
16
- }
17
- //# sourceMappingURL=logger.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.service.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAIxF,qBACa,aAAa;IAIC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAGrD,OAAO,CAAC,OAAO,CAAC;IANlB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAGU,aAAa,EAAE,aAAa,EAG5D,OAAO,CAAC,EAAE,mBAAmB,YAAA;IAKvC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI3C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG/B"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LoggerService = void 0;
4
- const tslib_1 = require("tslib");
5
- const config_1 = require("@edirect/config");
6
- const common_1 = require("@nestjs/common");
7
- const logger_class_1 = require("./logger.class");
8
- const logger_module_definition_1 = require("./logger.module.definition");
9
- let LoggerService = class LoggerService {
10
- configService;
11
- options;
12
- logger;
13
- constructor(configService, options) {
14
- this.configService = configService;
15
- this.options = options;
16
- this.logger = new logger_class_1.Logger(this.configService.getConfig(), this.options);
17
- }
18
- setSessionId(sessionId) {
19
- this.logger.setSessionId(sessionId);
20
- }
21
- setQuoteId(quoteId) {
22
- this.logger.setQuoteId(quoteId);
23
- }
24
- log(message, payload) {
25
- this.logger.log(message, payload);
26
- }
27
- info(message, payload) {
28
- this.logger.info(message, payload);
29
- }
30
- error(message, trace) {
31
- this.logger.error(message, trace);
32
- }
33
- warn(message, payload) {
34
- this.logger.warn(message, payload);
35
- }
36
- debug(message) {
37
- this.logger.debug(message);
38
- }
39
- verbose(message) {
40
- this.logger.verbose(message);
41
- }
42
- };
43
- exports.LoggerService = LoggerService;
44
- exports.LoggerService = LoggerService = tslib_1.__decorate([
45
- (0, common_1.Injectable)(),
46
- tslib_1.__param(0, (0, common_1.Inject)(config_1.ConfigService)),
47
- tslib_1.__param(1, (0, common_1.Optional)()),
48
- tslib_1.__param(1, (0, common_1.Inject)(logger_module_definition_1.MODULE_OPTIONS_TOKEN)),
49
- tslib_1.__metadata("design:paramtypes", [config_1.ConfigService, Object])
50
- ], LoggerService);
@@ -1 +0,0 @@
1
- {"version":"5.9.3"}