@eqxjs/nest-logger 3.1.0-beta.9 → 3.1.1-beta.0

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.
Files changed (122) hide show
  1. package/CHANGELOG +57 -1
  2. package/MIGRATION.md +234 -0
  3. package/PERFORMANCE_IMPROVEMENTS.md +158 -0
  4. package/README.md +2008 -16
  5. package/RESTRUCTURING_SUMMARY.md +272 -0
  6. package/STRUCTURE.md +110 -0
  7. package/dist/constants/action-message.constant.d.ts +187 -0
  8. package/dist/constants/action-message.constant.js +220 -0
  9. package/dist/constants/action-message.constant.js.map +1 -0
  10. package/dist/constants/index.d.ts +2 -0
  11. package/dist/constants/index.js +9 -0
  12. package/dist/constants/index.js.map +1 -0
  13. package/dist/constants/logger.constants.d.ts +17 -0
  14. package/dist/constants/logger.constants.js +20 -0
  15. package/dist/constants/logger.constants.js.map +1 -0
  16. package/dist/core/formatters/index.d.ts +1 -0
  17. package/dist/core/formatters/index.js +6 -0
  18. package/dist/core/formatters/index.js.map +1 -0
  19. package/dist/core/formatters/logger.formatter.d.ts +141 -0
  20. package/dist/core/formatters/logger.formatter.js +268 -0
  21. package/dist/core/formatters/logger.formatter.js.map +1 -0
  22. package/dist/core/loggers/app.logger.d.ts +46 -0
  23. package/dist/core/loggers/app.logger.js +92 -0
  24. package/dist/core/loggers/app.logger.js.map +1 -0
  25. package/dist/core/loggers/base-app.logger.d.ts +299 -0
  26. package/dist/core/loggers/base-app.logger.js +517 -0
  27. package/dist/core/loggers/base-app.logger.js.map +1 -0
  28. package/dist/core/loggers/custom.logger.d.ts +127 -0
  29. package/dist/core/loggers/custom.logger.js +260 -0
  30. package/dist/core/loggers/custom.logger.js.map +1 -0
  31. package/dist/core/loggers/index.d.ts +3 -0
  32. package/dist/core/loggers/index.js +10 -0
  33. package/dist/core/loggers/index.js.map +1 -0
  34. package/dist/helpers/datetime.helper.d.ts +24 -0
  35. package/dist/helpers/datetime.helper.js +36 -0
  36. package/dist/helpers/datetime.helper.js.map +1 -0
  37. package/dist/helpers/index.d.ts +5 -0
  38. package/dist/helpers/index.js +17 -0
  39. package/dist/helpers/index.js.map +1 -0
  40. package/dist/helpers/log.helper.d.ts +84 -0
  41. package/dist/helpers/log.helper.js +109 -0
  42. package/dist/helpers/log.helper.js.map +1 -0
  43. package/dist/helpers/logger-builder.helper.d.ts +242 -0
  44. package/dist/helpers/logger-builder.helper.js +345 -0
  45. package/dist/helpers/logger-builder.helper.js.map +1 -0
  46. package/dist/helpers/message-formatter.helper.d.ts +88 -0
  47. package/dist/helpers/message-formatter.helper.js +159 -0
  48. package/dist/helpers/message-formatter.helper.js.map +1 -0
  49. package/dist/helpers/time-performance.helper.d.ts +68 -0
  50. package/dist/helpers/time-performance.helper.js +82 -0
  51. package/dist/helpers/time-performance.helper.js.map +1 -0
  52. package/dist/index.d.ts +13 -5
  53. package/dist/index.js +24 -9
  54. package/dist/index.js.map +1 -1
  55. package/dist/interfaces/data-header.interface.d.ts +21 -0
  56. package/dist/{dto/m2.dto.js → interfaces/data-header.interface.js} +1 -1
  57. package/dist/interfaces/data-header.interface.js.map +1 -0
  58. package/dist/interfaces/data-protocol.interface.d.ts +14 -0
  59. package/dist/interfaces/data-protocol.interface.js +3 -0
  60. package/dist/interfaces/data-protocol.interface.js.map +1 -0
  61. package/dist/interfaces/data-service.interface.d.ts +21 -0
  62. package/dist/{dto/m3.dto.js → interfaces/data-service.interface.js} +1 -1
  63. package/dist/interfaces/data-service.interface.js.map +1 -0
  64. package/dist/{types.d.ts → interfaces/data.interface.d.ts} +4 -4
  65. package/dist/{dto/m1.dto.js → interfaces/data.interface.js} +1 -1
  66. package/dist/interfaces/data.interface.js.map +1 -0
  67. package/dist/interfaces/index.d.ts +5 -0
  68. package/dist/{types.js → interfaces/index.js} +1 -1
  69. package/dist/interfaces/index.js.map +1 -0
  70. package/dist/{dto/header.dto.js → interfaces/logger-opt.interface.js} +1 -1
  71. package/dist/interfaces/logger-opt.interface.js.map +1 -0
  72. package/dist/logger.module.js +4 -4
  73. package/dist/logger.module.js.map +1 -1
  74. package/dist/models/index.d.ts +1 -0
  75. package/dist/models/index.js +6 -0
  76. package/dist/models/index.js.map +1 -0
  77. package/dist/models/logger.dto.d.ts +71 -0
  78. package/dist/models/logger.dto.js +76 -0
  79. package/dist/models/logger.dto.js.map +1 -0
  80. package/package.json +30 -33
  81. package/dist/dto/header.dto.d.ts +0 -21
  82. package/dist/dto/header.dto.js.map +0 -1
  83. package/dist/dto/logger.dto.d.ts +0 -28
  84. package/dist/dto/logger.dto.js +0 -33
  85. package/dist/dto/logger.dto.js.map +0 -1
  86. package/dist/dto/m1.dto.d.ts +0 -7
  87. package/dist/dto/m1.dto.js.map +0 -1
  88. package/dist/dto/m2.dto.d.ts +0 -5
  89. package/dist/dto/m2.dto.js.map +0 -1
  90. package/dist/dto/m3.dto.d.ts +0 -5
  91. package/dist/dto/m3.dto.js.map +0 -1
  92. package/dist/dto/protocol.dto.d.ts +0 -14
  93. package/dist/dto/protocol.dto.js +0 -3
  94. package/dist/dto/protocol.dto.js.map +0 -1
  95. package/dist/dto/service.dto.d.ts +0 -25
  96. package/dist/dto/service.dto.js +0 -3
  97. package/dist/dto/service.dto.js.map +0 -1
  98. package/dist/logger.app.d.ts +0 -62
  99. package/dist/logger.app.js +0 -504
  100. package/dist/logger.app.js.map +0 -1
  101. package/dist/logger.service.d.ts +0 -15
  102. package/dist/logger.service.js +0 -158
  103. package/dist/logger.service.js.map +0 -1
  104. package/dist/logger.util.d.ts +0 -3
  105. package/dist/logger.util.js +0 -28
  106. package/dist/logger.util.js.map +0 -1
  107. package/dist/types.js.map +0 -1
  108. package/dist/utils/action.common.d.ts +0 -14
  109. package/dist/utils/action.common.js +0 -43
  110. package/dist/utils/action.common.js.map +0 -1
  111. package/dist/utils/datetime.util.d.ts +0 -1
  112. package/dist/utils/datetime.util.js +0 -13
  113. package/dist/utils/datetime.util.js.map +0 -1
  114. package/dist/utils/logger.opt.js +0 -3
  115. package/dist/utils/logger.opt.js.map +0 -1
  116. package/dist/utils/m1.utils.d.ts +0 -3
  117. package/dist/utils/m1.utils.js +0 -79
  118. package/dist/utils/m1.utils.js.map +0 -1
  119. package/dist/utils/time.performance.d.ts +0 -6
  120. package/dist/utils/time.performance.js +0 -18
  121. package/dist/utils/time.performance.js.map +0 -1
  122. /package/dist/{utils/logger.opt.d.ts → interfaces/logger-opt.interface.d.ts} +0 -0
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionMessage = void 0;
4
+ /**
5
+ * ActionMessage - Provides standardized action tags for consistent logging across the application.
6
+ *
7
+ * This class contains static methods that return predefined action tags used for categorizing
8
+ * and filtering log entries. Using these constants ensures consistency in log formatting and
9
+ * makes it easier to search and analyze logs.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { ActionMessage } from '@eqxjs/nest-logger';
14
+ *
15
+ * // Use in logging
16
+ * logger.info('Processing message', ActionMessage.consume());
17
+ * logger.info('Request received', ActionMessage.httpRequest());
18
+ * logger.error('Operation failed', ActionMessage.exception());
19
+ * ```
20
+ */
21
+ class ActionMessage {
22
+ /**
23
+ * Returns the action tag for message consumption in progress.
24
+ * Used when starting to consume a message from a queue or broker.
25
+ *
26
+ * @returns The string '[CONSUMING]'
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * logger.info('Starting to consume', ActionMessage.consume());
31
+ * ```
32
+ */
33
+ static consume() {
34
+ return `[CONSUMING]`;
35
+ }
36
+ /**
37
+ * Returns the action tag for completed message consumption.
38
+ * Used when a message has been successfully consumed from a queue or broker.
39
+ *
40
+ * @returns The string '[CONSUMED]'
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * logger.info('Message consumed', ActionMessage.consumed());
45
+ * ```
46
+ */
47
+ static consumed() {
48
+ return `[CONSUMED]`;
49
+ }
50
+ /**
51
+ * Returns the action tag for message production in progress.
52
+ * Used when starting to produce/publish a message to a queue or broker.
53
+ *
54
+ * @returns The string '[PRODUCING]'
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * logger.info('Publishing message', ActionMessage.produce());
59
+ * ```
60
+ */
61
+ static produce() {
62
+ return `[PRODUCING]`;
63
+ }
64
+ /**
65
+ * Returns the action tag for completed message production.
66
+ * Used when a message has been successfully produced/published.
67
+ *
68
+ * @returns The string '[PRODUCED]'
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * logger.info('Message published', ActionMessage.produced());
73
+ * ```
74
+ */
75
+ static produced() {
76
+ return `[PRODUCED]`;
77
+ }
78
+ /**
79
+ * Returns the action tag for HTTP request operations.
80
+ * Used when receiving or sending HTTP requests.
81
+ *
82
+ * @returns The string '[HTTP_REQUEST]'
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * logger.info('HTTP request received', ActionMessage.httpRequest());
87
+ * ```
88
+ */
89
+ static httpRequest() {
90
+ return `[HTTP_REQUEST]`;
91
+ }
92
+ /**
93
+ * Returns the action tag for HTTP response operations.
94
+ * Used when sending or receiving HTTP responses.
95
+ *
96
+ * @returns The string '[HTTP_RESPONSE]'
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * logger.info('Sending response', ActionMessage.httpResponse());
101
+ * ```
102
+ */
103
+ static httpResponse() {
104
+ return `[HTTP_RESPONSE]`;
105
+ }
106
+ /**
107
+ * Returns the action tag for WebSocket message reception.
108
+ * Used when receiving messages via WebSocket.
109
+ *
110
+ * @returns The string '[WS_RECEIVED]'
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * logger.info('WebSocket message received', ActionMessage.wsRecv());
115
+ * ```
116
+ */
117
+ static wsRecv() {
118
+ return `[WS_RECEIVED]`;
119
+ }
120
+ /**
121
+ * Returns the action tag for WebSocket message sending.
122
+ * Used when sending messages via WebSocket.
123
+ *
124
+ * @returns The string '[WS_SENT]'
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * logger.info('WebSocket message sent', ActionMessage.wsSent());
129
+ * ```
130
+ */
131
+ static wsSent() {
132
+ return `[WS_SENT]`;
133
+ }
134
+ /**
135
+ * Returns the action tag for database request operations.
136
+ * Used when initiating database queries or operations.
137
+ *
138
+ * @returns The string '[DB_REQUEST]'
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * logger.debug('Executing query', ActionMessage.dbRequest());
143
+ * ```
144
+ */
145
+ static dbRequest() {
146
+ return `[DB_REQUEST]`;
147
+ }
148
+ /**
149
+ * Returns the action tag for database response operations.
150
+ * Used when receiving results from database queries or operations.
151
+ *
152
+ * @returns The string '[DB_RESPONSE]'
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * logger.debug('Query completed', ActionMessage.dbResponse());
157
+ * ```
158
+ */
159
+ static dbResponse() {
160
+ return `[DB_RESPONSE]`;
161
+ }
162
+ /**
163
+ * Returns the action tag for application logic operations.
164
+ * Used for business logic processing and internal operations.
165
+ *
166
+ * @returns The string '[APP_LOGIC]'
167
+ *
168
+ * @example
169
+ * ```typescript
170
+ * logger.info('Processing business logic', ActionMessage.appLogic());
171
+ * ```
172
+ */
173
+ static appLogic() {
174
+ return `[APP_LOGIC]`;
175
+ }
176
+ /**
177
+ * Returns the action tag for inbound operations.
178
+ * Used when receiving data from external services or systems.
179
+ *
180
+ * @returns The string '[INBOUND]'
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * logger.info('Receiving data', ActionMessage.inbound());
185
+ * ```
186
+ */
187
+ static inbound() {
188
+ return `[INBOUND]`;
189
+ }
190
+ /**
191
+ * Returns the action tag for outbound operations.
192
+ * Used when sending data to external services or systems.
193
+ *
194
+ * @returns The string '[OUTBOUND]'
195
+ *
196
+ * @example
197
+ * ```typescript
198
+ * logger.info('Sending data to external API', ActionMessage.outbound());
199
+ * ```
200
+ */
201
+ static outbound() {
202
+ return `[OUTBOUND]`;
203
+ }
204
+ /**
205
+ * Returns the action tag for exception/error conditions.
206
+ * Used when logging exceptions, errors, or failure scenarios.
207
+ *
208
+ * @returns The string '[EXCEPTION]'
209
+ *
210
+ * @example
211
+ * ```typescript
212
+ * logger.error('Operation failed', ActionMessage.exception());
213
+ * ```
214
+ */
215
+ static exception() {
216
+ return '[EXCEPTION]';
217
+ }
218
+ }
219
+ exports.ActionMessage = ActionMessage;
220
+ //# sourceMappingURL=action-message.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-message.constant.js","sourceRoot":"","sources":["../../src/constants/action-message.constant.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,aAAa;IACxB;;;;;;;;;;OAUG;IACI,MAAM,CAAC,OAAO;QACnB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,QAAQ;QACpB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,OAAO;QACnB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,QAAQ;QACpB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,WAAW;QACvB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,YAAY;QACxB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,MAAM;QAClB,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,MAAM;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,SAAS;QACrB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,UAAU;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,QAAQ;QACpB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,OAAO;QACnB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,QAAQ;QACpB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,SAAS;QACrB,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAlND,sCAkNC"}
@@ -0,0 +1,2 @@
1
+ export { ActionMessage } from './action-message.constant';
2
+ export { DEFAULT_VALUES, LOG_LEVELS, LogLevel } from './logger.constants';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOG_LEVELS = exports.DEFAULT_VALUES = exports.ActionMessage = void 0;
4
+ var action_message_constant_1 = require("./action-message.constant");
5
+ Object.defineProperty(exports, "ActionMessage", { enumerable: true, get: function () { return action_message_constant_1.ActionMessage; } });
6
+ var logger_constants_1 = require("./logger.constants");
7
+ Object.defineProperty(exports, "DEFAULT_VALUES", { enumerable: true, get: function () { return logger_constants_1.DEFAULT_VALUES; } });
8
+ Object.defineProperty(exports, "LOG_LEVELS", { enumerable: true, get: function () { return logger_constants_1.LOG_LEVELS; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAAjD,wHAAA,aAAa,OAAA;AACtB,uDAA0E;AAAjE,kHAAA,cAAc,OAAA;AAAE,8GAAA,UAAU,OAAA"}
@@ -0,0 +1,17 @@
1
+ export declare const DEFAULT_VALUES: {
2
+ NONE: string;
3
+ EVENT_SOURCE: string;
4
+ RECORD_TYPE_DETAIL: string;
5
+ RECORD_TYPE_SUMMARY: string;
6
+ MAX_MESSAGE_LENGTH: number;
7
+ DEFAULT_APP_NAME: string;
8
+ };
9
+ export declare const LOG_LEVELS: {
10
+ readonly DEBUG: "debug";
11
+ readonly INFO: "info";
12
+ readonly LOG: "log";
13
+ readonly WARN: "warn";
14
+ readonly ERROR: "error";
15
+ readonly VERBOSE: "verbose";
16
+ };
17
+ export type LogLevel = (typeof LOG_LEVELS)[keyof typeof LOG_LEVELS];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOG_LEVELS = exports.DEFAULT_VALUES = void 0;
4
+ exports.DEFAULT_VALUES = {
5
+ NONE: 'none',
6
+ EVENT_SOURCE: 'Event source',
7
+ RECORD_TYPE_DETAIL: 'detail',
8
+ RECORD_TYPE_SUMMARY: 'summary',
9
+ MAX_MESSAGE_LENGTH: 4096,
10
+ DEFAULT_APP_NAME: 'EQXJS',
11
+ };
12
+ exports.LOG_LEVELS = {
13
+ DEBUG: 'debug',
14
+ INFO: 'info',
15
+ LOG: 'log',
16
+ WARN: 'warn',
17
+ ERROR: 'error',
18
+ VERBOSE: 'verbose',
19
+ };
20
+ //# sourceMappingURL=logger.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.constants.js","sourceRoot":"","sources":["../../src/constants/logger.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,QAAQ;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,kBAAkB,EAAE,IAAI;IACxB,gBAAgB,EAAE,OAAO;CAC1B,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC"}
@@ -0,0 +1 @@
1
+ export { LoggerFormat } from './logger.formatter';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoggerFormat = void 0;
4
+ var logger_formatter_1 = require("./logger.formatter");
5
+ Object.defineProperty(exports, "LoggerFormat", { enumerable: true, get: function () { return logger_formatter_1.LoggerFormat; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/formatters/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAAzC,gHAAA,YAAY,OAAA"}
@@ -0,0 +1,141 @@
1
+ import { BaseAppLogger } from '../loggers/base-app.logger';
2
+ import { LoggerDto } from '../../models/logger.dto';
3
+ import { LoggerOpt } from '../../interfaces/logger-opt.interface';
4
+ import { DataM, DataM1I, DataM2I, DataM3I } from '../../interfaces/data.interface';
5
+ type MessageType = 'M1' | 'M2' | 'M3';
6
+ /**
7
+ * LoggerFormat - Format-specific logger for M1, M2, and M3 message protocols.
8
+ *
9
+ * Provides logging capabilities for different message formats used in distributed systems:
10
+ * - **M1**: Message broker/queue operations (Kafka, RabbitMQ, etc.)
11
+ * - **M2**: HTTP/protocol operations (REST APIs, GraphQL, etc.)
12
+ * - **M3**: Service-to-service operations (gRPC, internal services, databases, etc.)
13
+ *
14
+ * Each format requires specific data structures with appropriate header and metadata fields.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // M1 Format
19
+ * const loggerM1 = new LoggerFormat(baseLogger, 'M1');
20
+ * loggerM1.info('order.topic', '[CONSUMING]', dataM1, 'Processing order');
21
+ *
22
+ * // M2 Format
23
+ * const loggerM2 = new LoggerFormat(baseLogger, 'M2');
24
+ * loggerM2.info('api.users', '[HTTP_REQUEST]', dataM2, 'User creation');
25
+ *
26
+ * // M3 Format
27
+ * const loggerM3 = new LoggerFormat(baseLogger, 'M3');
28
+ * loggerM3.debug('db.users', '[DB_REQUEST]', dataM3, 'Query users');
29
+ * ```
30
+ */
31
+ export declare class LoggerFormat {
32
+ protected readonly messageType: MessageType;
33
+ private logger;
34
+ /**
35
+ * Creates a new LoggerFormat instance.
36
+ *
37
+ * @param logger - BaseAppLogger instance for actual logging
38
+ * @param messageType - Message format type ('M1', 'M2', or 'M3')
39
+ */
40
+ constructor(logger: BaseAppLogger, messageType: MessageType);
41
+ /**
42
+ * Internal method to handle log level checking and routing.
43
+ *
44
+ * @param level - Log level
45
+ * @param topic - Topic identifier
46
+ * @param action - Action tag
47
+ * @param data - Message data
48
+ * @param message - Optional message text
49
+ * @param opt - Optional configuration
50
+ * @private
51
+ */
52
+ private logMethod;
53
+ /**
54
+ * Logs a debug-level message for detailed diagnostic information.
55
+ *
56
+ * @param topic - Topic or identifier (e.g., 'payment.topic', 'api.users')
57
+ * @param action - Action tag (e.g., '[CONSUMING]', '[HTTP_REQUEST]')
58
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
59
+ * @param message - Optional descriptive message
60
+ * @param opt - Optional logging configuration
61
+ */
62
+ debug(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
63
+ /**
64
+ * Logs an info-level message for general information.
65
+ *
66
+ * @param topic - Topic or identifier
67
+ * @param action - Action tag
68
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
69
+ * @param message - Optional descriptive message
70
+ * @param opt - Optional logging configuration
71
+ */
72
+ info(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
73
+ /**
74
+ * Logs an info-level message (alias for info method).
75
+ *
76
+ * @param topic - Topic or identifier
77
+ * @param action - Action tag
78
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
79
+ * @param message - Optional descriptive message
80
+ * @param opt - Optional logging configuration
81
+ */
82
+ log(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
83
+ /**
84
+ * Logs an error-level message for error conditions.
85
+ *
86
+ * @param topic - Topic or identifier
87
+ * @param action - Action tag (typically '[EXCEPTION]')
88
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
89
+ * @param message - Optional error message
90
+ * @param opt - Optional logging configuration
91
+ */
92
+ error(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
93
+ /**
94
+ * Logs a warning-level message for potentially harmful situations.
95
+ *
96
+ * @param topic - Topic or identifier
97
+ * @param action - Action tag
98
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
99
+ * @param message - Optional warning message
100
+ * @param opt - Optional logging configuration
101
+ */
102
+ warn(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
103
+ /**
104
+ * Logs a verbose-level message for most detailed information.
105
+ *
106
+ * @param topic - Topic or identifier
107
+ * @param action - Action tag
108
+ * @param data - Message data (DataM1I, DataM2I, or DataM3I)
109
+ * @param message - Optional verbose message
110
+ * @param opt - Optional logging configuration
111
+ */
112
+ verbose(topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
113
+ /**
114
+ * Routes the message to the appropriate format-specific logger (M1/M2/M3).
115
+ *
116
+ * @param serverity - Log severity level
117
+ * @param action - Action tag
118
+ * @param message - Log message
119
+ * @param data - Message data
120
+ * @param topic - Topic identifier
121
+ * @param opt - Optional configuration
122
+ * @public
123
+ */
124
+ messageLog(serverity: string, action: string, message: any, data: DataM, topic: string, opt?: LoggerOpt): void;
125
+ summarySuccess(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM, opt?: LoggerOpt): LoggerDto;
126
+ summaryError(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM, stack?: string[], opt?: LoggerOpt): LoggerDto;
127
+ protected summaryM1Success(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM1I, opt?: LoggerOpt): LoggerDto;
128
+ protected summaryM1Error(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM1I, stack?: string[], opt?: LoggerOpt): LoggerDto;
129
+ protected summaryM2Success(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM2I, opt?: LoggerOpt): LoggerDto;
130
+ protected summaryM2Error(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM2I, stack?: string[], opt?: LoggerOpt): LoggerDto;
131
+ protected summaryM3Success(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM3I, opt?: LoggerOpt): LoggerDto;
132
+ protected summaryM3Error(topic: string, appResult: string, appResultCode: string, serviceTime: number, data: DataM3I, stack?: any[], opt?: LoggerOpt): LoggerDto;
133
+ private callSummarySuccess;
134
+ private callSummaryError;
135
+ protected writeLogCommon(functionName: string, topic: string, action: string, data: any, message?: string, opt?: LoggerOpt): void;
136
+ protected m1Logger(severity: string, action: string, message: any, data: DataM1I, topic: string, opt?: LoggerOpt): void;
137
+ protected m2Logger(severity: string, action: string, message: any, data: DataM2I, topic: string, opt?: LoggerOpt): void;
138
+ protected m3Logger(severity: string, action: string, message: any, data: DataM3I, topic: string, opt?: LoggerOpt): void;
139
+ private callLogger;
140
+ }
141
+ export {};