@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.
- package/CHANGELOG +57 -1
- package/MIGRATION.md +234 -0
- package/PERFORMANCE_IMPROVEMENTS.md +158 -0
- package/README.md +2008 -16
- package/RESTRUCTURING_SUMMARY.md +272 -0
- package/STRUCTURE.md +110 -0
- package/dist/constants/action-message.constant.d.ts +187 -0
- package/dist/constants/action-message.constant.js +220 -0
- package/dist/constants/action-message.constant.js.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +9 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/logger.constants.d.ts +17 -0
- package/dist/constants/logger.constants.js +20 -0
- package/dist/constants/logger.constants.js.map +1 -0
- package/dist/core/formatters/index.d.ts +1 -0
- package/dist/core/formatters/index.js +6 -0
- package/dist/core/formatters/index.js.map +1 -0
- package/dist/core/formatters/logger.formatter.d.ts +141 -0
- package/dist/core/formatters/logger.formatter.js +268 -0
- package/dist/core/formatters/logger.formatter.js.map +1 -0
- package/dist/core/loggers/app.logger.d.ts +46 -0
- package/dist/core/loggers/app.logger.js +92 -0
- package/dist/core/loggers/app.logger.js.map +1 -0
- package/dist/core/loggers/base-app.logger.d.ts +299 -0
- package/dist/core/loggers/base-app.logger.js +517 -0
- package/dist/core/loggers/base-app.logger.js.map +1 -0
- package/dist/core/loggers/custom.logger.d.ts +127 -0
- package/dist/core/loggers/custom.logger.js +260 -0
- package/dist/core/loggers/custom.logger.js.map +1 -0
- package/dist/core/loggers/index.d.ts +3 -0
- package/dist/core/loggers/index.js +10 -0
- package/dist/core/loggers/index.js.map +1 -0
- package/dist/helpers/datetime.helper.d.ts +24 -0
- package/dist/helpers/datetime.helper.js +36 -0
- package/dist/helpers/datetime.helper.js.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +17 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/log.helper.d.ts +84 -0
- package/dist/helpers/log.helper.js +109 -0
- package/dist/helpers/log.helper.js.map +1 -0
- package/dist/helpers/logger-builder.helper.d.ts +242 -0
- package/dist/helpers/logger-builder.helper.js +345 -0
- package/dist/helpers/logger-builder.helper.js.map +1 -0
- package/dist/helpers/message-formatter.helper.d.ts +88 -0
- package/dist/helpers/message-formatter.helper.js +159 -0
- package/dist/helpers/message-formatter.helper.js.map +1 -0
- package/dist/helpers/time-performance.helper.d.ts +68 -0
- package/dist/helpers/time-performance.helper.js +82 -0
- package/dist/helpers/time-performance.helper.js.map +1 -0
- package/dist/index.d.ts +13 -5
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/dist/interfaces/data-header.interface.d.ts +21 -0
- package/dist/{dto/m2.dto.js → interfaces/data-header.interface.js} +1 -1
- package/dist/interfaces/data-header.interface.js.map +1 -0
- package/dist/interfaces/data-protocol.interface.d.ts +14 -0
- package/dist/interfaces/data-protocol.interface.js +3 -0
- package/dist/interfaces/data-protocol.interface.js.map +1 -0
- package/dist/interfaces/data-service.interface.d.ts +21 -0
- package/dist/{dto/m3.dto.js → interfaces/data-service.interface.js} +1 -1
- package/dist/interfaces/data-service.interface.js.map +1 -0
- package/dist/{types.d.ts → interfaces/data.interface.d.ts} +4 -4
- package/dist/{dto/m1.dto.js → interfaces/data.interface.js} +1 -1
- package/dist/interfaces/data.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +5 -0
- package/dist/{types.js → interfaces/index.js} +1 -1
- package/dist/interfaces/index.js.map +1 -0
- package/dist/{dto/header.dto.js → interfaces/logger-opt.interface.js} +1 -1
- package/dist/interfaces/logger-opt.interface.js.map +1 -0
- package/dist/logger.module.js +4 -4
- package/dist/logger.module.js.map +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +6 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/logger.dto.d.ts +71 -0
- package/dist/models/logger.dto.js +76 -0
- package/dist/models/logger.dto.js.map +1 -0
- package/package.json +30 -33
- package/dist/dto/header.dto.d.ts +0 -21
- package/dist/dto/header.dto.js.map +0 -1
- package/dist/dto/logger.dto.d.ts +0 -28
- package/dist/dto/logger.dto.js +0 -33
- package/dist/dto/logger.dto.js.map +0 -1
- package/dist/dto/m1.dto.d.ts +0 -7
- package/dist/dto/m1.dto.js.map +0 -1
- package/dist/dto/m2.dto.d.ts +0 -5
- package/dist/dto/m2.dto.js.map +0 -1
- package/dist/dto/m3.dto.d.ts +0 -5
- package/dist/dto/m3.dto.js.map +0 -1
- package/dist/dto/protocol.dto.d.ts +0 -14
- package/dist/dto/protocol.dto.js +0 -3
- package/dist/dto/protocol.dto.js.map +0 -1
- package/dist/dto/service.dto.d.ts +0 -25
- package/dist/dto/service.dto.js +0 -3
- package/dist/dto/service.dto.js.map +0 -1
- package/dist/logger.app.d.ts +0 -62
- package/dist/logger.app.js +0 -504
- package/dist/logger.app.js.map +0 -1
- package/dist/logger.service.d.ts +0 -15
- package/dist/logger.service.js +0 -158
- package/dist/logger.service.js.map +0 -1
- package/dist/logger.util.d.ts +0 -3
- package/dist/logger.util.js +0 -28
- package/dist/logger.util.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/action.common.d.ts +0 -14
- package/dist/utils/action.common.js +0 -43
- package/dist/utils/action.common.js.map +0 -1
- package/dist/utils/datetime.util.d.ts +0 -1
- package/dist/utils/datetime.util.js +0 -13
- package/dist/utils/datetime.util.js.map +0 -1
- package/dist/utils/logger.opt.js +0 -3
- package/dist/utils/logger.opt.js.map +0 -1
- package/dist/utils/m1.utils.d.ts +0 -3
- package/dist/utils/m1.utils.js +0 -79
- package/dist/utils/m1.utils.js.map +0 -1
- package/dist/utils/time.performance.d.ts +0 -6
- package/dist/utils/time.performance.js +0 -18
- package/dist/utils/time.performance.js.map +0 -1
- /package/dist/{utils/logger.opt.d.ts → interfaces/logger-opt.interface.d.ts} +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { CustomLogger } from './custom.logger';
|
|
2
|
+
import { LoggerDto } from '../../models/logger.dto';
|
|
3
|
+
import { LoggerOpt } from '../../interfaces/logger-opt.interface';
|
|
4
|
+
/**
|
|
5
|
+
* BaseAppLogger extends CustomLogger to provide application-level logging with OpenTelemetry integration.
|
|
6
|
+
* Supports structured logging with telemetry metrics, distributed tracing, and standardized log formats.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BaseAppLogger extends CustomLogger {
|
|
9
|
+
protected appName: string;
|
|
10
|
+
protected context?: string;
|
|
11
|
+
private ignoreAppResultCodeOnTelemetry;
|
|
12
|
+
private allMetric;
|
|
13
|
+
private histrogramMetric;
|
|
14
|
+
private tracer;
|
|
15
|
+
private otelLogger;
|
|
16
|
+
protected readonly cachedAppVersion: string;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of BaseAppLogger with optional application name and context.
|
|
19
|
+
* Initializes OpenTelemetry metrics (counter, histogram) and tracer for distributed tracing.
|
|
20
|
+
*
|
|
21
|
+
* @param appName - The name of the application (default: 'EQXJS')
|
|
22
|
+
* @param context - Optional context or component name for the logger
|
|
23
|
+
*/
|
|
24
|
+
constructor();
|
|
25
|
+
constructor(appName?: string);
|
|
26
|
+
constructor(appName?: string, context?: string);
|
|
27
|
+
/**
|
|
28
|
+
* Converts undefined or empty metric attributes to the default 'none' value.
|
|
29
|
+
* Used to ensure telemetry attributes always have a valid string value.
|
|
30
|
+
*
|
|
31
|
+
* @param metricAttr - The metric attribute value to normalize
|
|
32
|
+
* @returns The normalized metric attribute or 'none' if undefined/empty
|
|
33
|
+
*/
|
|
34
|
+
private setMetricAttrToNone;
|
|
35
|
+
/**
|
|
36
|
+
* Initializes and constructs a LoggerDto object with all necessary fields for structured logging.
|
|
37
|
+
* Uses the builder pattern to create a fully populated log entry.
|
|
38
|
+
*
|
|
39
|
+
* @param level - The log level (debug, info, warn, error, verbose)
|
|
40
|
+
* @param message - The log message (any type, will be formatted)
|
|
41
|
+
* @param action - The action being logged (default: 'none')
|
|
42
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
43
|
+
* @param recordName - The record identifier (default: 'none')
|
|
44
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
45
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
46
|
+
* @param channel - The channel through which the request came (default: 'none')
|
|
47
|
+
* @param componentVersion - The version of the component (default: 'none')
|
|
48
|
+
* @param useCase - The use case being executed (default: 'none')
|
|
49
|
+
* @param useCaseStep - The specific step within the use case (default: 'none')
|
|
50
|
+
* @param user - The user identifier (default: 'none')
|
|
51
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
52
|
+
* @param public_ - Public identifier (default: 'none')
|
|
53
|
+
* @param opt - Optional logging options for customization
|
|
54
|
+
* @returns A fully constructed LoggerDto object
|
|
55
|
+
*/
|
|
56
|
+
initializeAppLogger(level: string, message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): LoggerDto;
|
|
57
|
+
/**
|
|
58
|
+
* Internal method to write a log entry at the specified level.
|
|
59
|
+
* Initializes the logger detail and flushes it to the output.
|
|
60
|
+
*
|
|
61
|
+
* @param level - The log level
|
|
62
|
+
* @param message - The log message
|
|
63
|
+
* @param action - The action being logged (default: 'none')
|
|
64
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
65
|
+
* @param recordName - The record identifier (default: 'none')
|
|
66
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
67
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
68
|
+
* @param channel - The channel identifier (default: 'none')
|
|
69
|
+
* @param componentVersion - The component version (default: 'none')
|
|
70
|
+
* @param useCase - The use case (default: 'none')
|
|
71
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
72
|
+
* @param user - The user identifier (default: 'none')
|
|
73
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
74
|
+
* @param public_ - Public identifier (default: 'none')
|
|
75
|
+
* @param opt - Optional logging options
|
|
76
|
+
*/
|
|
77
|
+
private writeLog;
|
|
78
|
+
/**
|
|
79
|
+
* Logs a debug-level message. Debug logs are typically used for detailed diagnostic information.
|
|
80
|
+
* Only writes the log if the debug level is enabled in the configuration.
|
|
81
|
+
*
|
|
82
|
+
* @param message - The debug message to log
|
|
83
|
+
* @param action - The action being logged (default: 'none')
|
|
84
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
85
|
+
* @param recordName - The record identifier (default: 'none')
|
|
86
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
87
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
88
|
+
* @param channel - The channel identifier (default: 'none')
|
|
89
|
+
* @param componentVersion - The component version (default: 'none')
|
|
90
|
+
* @param useCase - The use case (default: 'none')
|
|
91
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
92
|
+
* @param user - The user identifier (default: 'none')
|
|
93
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
94
|
+
* @param public_ - Public identifier (default: 'none')
|
|
95
|
+
* @param opt - Optional logging options
|
|
96
|
+
*/
|
|
97
|
+
debug(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
98
|
+
/**
|
|
99
|
+
* Logs an info-level message. This is an alias for the info() method.
|
|
100
|
+
* Used for general informational messages about application execution.
|
|
101
|
+
*
|
|
102
|
+
* @param message - The informational message to log
|
|
103
|
+
* @param action - The action being logged (default: 'none')
|
|
104
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
105
|
+
* @param recordName - The record identifier (default: 'none')
|
|
106
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
107
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
108
|
+
* @param channel - The channel identifier (default: 'none')
|
|
109
|
+
* @param componentVersion - The component version (default: 'none')
|
|
110
|
+
* @param useCase - The use case (default: 'none')
|
|
111
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
112
|
+
* @param user - The user identifier (default: 'none')
|
|
113
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
114
|
+
* @param public_ - Public identifier (default: 'none')
|
|
115
|
+
* @param opt - Optional logging options
|
|
116
|
+
*/
|
|
117
|
+
log(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
118
|
+
/**
|
|
119
|
+
* Logs an info-level message. Info logs provide general information about application execution.
|
|
120
|
+
* Only writes the log if the info level is enabled in the configuration.
|
|
121
|
+
*
|
|
122
|
+
* @param message - The informational message to log
|
|
123
|
+
* @param action - The action being logged (default: 'none')
|
|
124
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
125
|
+
* @param recordName - The record identifier (default: 'none')
|
|
126
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
127
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
128
|
+
* @param channel - The channel identifier (default: 'none')
|
|
129
|
+
* @param componentVersion - The component version (default: 'none')
|
|
130
|
+
* @param useCase - The use case (default: 'none')
|
|
131
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
132
|
+
* @param user - The user identifier (default: 'none')
|
|
133
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
134
|
+
* @param public_ - Public identifier (default: 'none')
|
|
135
|
+
* @param opt - Optional logging options
|
|
136
|
+
*/
|
|
137
|
+
info(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
138
|
+
/**
|
|
139
|
+
* Logs a warning-level message. Warning logs indicate potential issues or unusual conditions.
|
|
140
|
+
* Only writes the log if the warn level is enabled in the configuration.
|
|
141
|
+
*
|
|
142
|
+
* @param message - The warning message to log
|
|
143
|
+
* @param action - The action being logged (default: 'none')
|
|
144
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
145
|
+
* @param recordName - The record identifier (default: 'none')
|
|
146
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
147
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
148
|
+
* @param channel - The channel identifier (default: 'none')
|
|
149
|
+
* @param componentVersion - The component version (default: 'none')
|
|
150
|
+
* @param useCase - The use case (default: 'none')
|
|
151
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
152
|
+
* @param user - The user identifier (default: 'none')
|
|
153
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
154
|
+
* @param public_ - Public identifier (default: 'none')
|
|
155
|
+
* @param opt - Optional logging options
|
|
156
|
+
*/
|
|
157
|
+
warn(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
158
|
+
/**
|
|
159
|
+
* Logs an error-level message. Error logs indicate failures or critical issues.
|
|
160
|
+
* Only writes the log if the error level is enabled in the configuration.
|
|
161
|
+
*
|
|
162
|
+
* @param message - The error message to log
|
|
163
|
+
* @param action - The action being logged (default: 'none')
|
|
164
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
165
|
+
* @param recordName - The record identifier (default: 'none')
|
|
166
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
167
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
168
|
+
* @param channel - The channel identifier (default: 'none')
|
|
169
|
+
* @param componentVersion - The component version (default: 'none')
|
|
170
|
+
* @param useCase - The use case (default: 'none')
|
|
171
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
172
|
+
* @param user - The user identifier (default: 'none')
|
|
173
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
174
|
+
* @param public_ - Public identifier (default: 'none')
|
|
175
|
+
* @param opt - Optional logging options
|
|
176
|
+
*/
|
|
177
|
+
error(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
178
|
+
/**
|
|
179
|
+
* Logs a verbose-level message. Verbose logs provide the most detailed information.
|
|
180
|
+
* Only writes the log if the verbose level is enabled in the configuration.
|
|
181
|
+
*
|
|
182
|
+
* @param message - The verbose message to log
|
|
183
|
+
* @param action - The action being logged (default: 'none')
|
|
184
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
185
|
+
* @param recordName - The record identifier (default: 'none')
|
|
186
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
187
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
188
|
+
* @param channel - The channel identifier (default: 'none')
|
|
189
|
+
* @param componentVersion - The component version (default: 'none')
|
|
190
|
+
* @param useCase - The use case (default: 'none')
|
|
191
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
192
|
+
* @param user - The user identifier (default: 'none')
|
|
193
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
194
|
+
* @param public_ - Public identifier (default: 'none')
|
|
195
|
+
* @param opt - Optional logging options
|
|
196
|
+
*/
|
|
197
|
+
verbose(message: any, action?: string, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): void;
|
|
198
|
+
/**
|
|
199
|
+
* Logs a successful operation summary with telemetry metrics.
|
|
200
|
+
* Creates a summary-type log entry and records OpenTelemetry metrics (counter, histogram, span).
|
|
201
|
+
*
|
|
202
|
+
* @param appResult - The result description of the operation (default: 'none')
|
|
203
|
+
* @param appResultCode - The result code of the operation (default: 'none')
|
|
204
|
+
* @param serviceTime - The service processing time in milliseconds (default: 0)
|
|
205
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
206
|
+
* @param recordName - The record identifier (default: 'none')
|
|
207
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
208
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
209
|
+
* @param channel - The channel identifier (default: 'none')
|
|
210
|
+
* @param componentVersion - The component version (default: 'none')
|
|
211
|
+
* @param useCase - The use case (default: 'none')
|
|
212
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
213
|
+
* @param user - The user identifier (default: 'none')
|
|
214
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
215
|
+
* @param public_ - Public identifier (default: 'none')
|
|
216
|
+
* @param opt - Optional logging options
|
|
217
|
+
* @returns The created LoggerDto object
|
|
218
|
+
*/
|
|
219
|
+
summarySuccess(appResult?: string, appResultCode?: string, serviceTime?: number, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, opt?: LoggerOpt): LoggerDto;
|
|
220
|
+
/**
|
|
221
|
+
* Logs a failed operation summary with telemetry metrics and optional stack trace.
|
|
222
|
+
* Creates a summary-type error log entry and records OpenTelemetry metrics (counter, histogram, span).
|
|
223
|
+
*
|
|
224
|
+
* @param appResult - The result description of the failed operation (default: 'none')
|
|
225
|
+
* @param appResultCode - The error result code (default: 'none')
|
|
226
|
+
* @param serviceTime - The service processing time in milliseconds (default: 0)
|
|
227
|
+
* @param originateServiceName - The originating service name (default: 'none')
|
|
228
|
+
* @param recordName - The record identifier (default: 'none')
|
|
229
|
+
* @param sessionId - The session identifier (default: 'none')
|
|
230
|
+
* @param transactionId - The transaction identifier (default: 'none')
|
|
231
|
+
* @param channel - The channel identifier (default: 'none')
|
|
232
|
+
* @param componentVersion - The component version (default: 'none')
|
|
233
|
+
* @param useCase - The use case (default: 'none')
|
|
234
|
+
* @param useCaseStep - The use case step (default: 'none')
|
|
235
|
+
* @param user - The user identifier (default: 'none')
|
|
236
|
+
* @param device - The device identifier(s) (default: 'none')
|
|
237
|
+
* @param public_ - Public identifier (default: 'none')
|
|
238
|
+
* @param stack - Optional error stack trace array
|
|
239
|
+
* @param opt - Optional logging options
|
|
240
|
+
* @returns The created LoggerDto object
|
|
241
|
+
*/
|
|
242
|
+
summaryError(appResult?: string, appResultCode?: string, serviceTime?: number, originateServiceName?: string, recordName?: string, sessionId?: string, transactionId?: string, channel?: string, componentVersion?: string, useCase?: string, useCaseStep?: string, user?: string, device?: string | string[], public_?: string, stack?: string[], opt?: LoggerOpt): LoggerDto;
|
|
243
|
+
/**
|
|
244
|
+
* Creates a summary log entry with specialized fields for operation results.
|
|
245
|
+
* Transforms the log structure by removing message/action fields and adding summary-specific fields.
|
|
246
|
+
*
|
|
247
|
+
* @param level - The log level (info for success, error for failure)
|
|
248
|
+
* @param appResult - The result description
|
|
249
|
+
* @param appResultCode - The result code
|
|
250
|
+
* @param serviceTime - The service processing time in milliseconds
|
|
251
|
+
* @param originateServiceName - The originating service name
|
|
252
|
+
* @param recordName - The record identifier
|
|
253
|
+
* @param sessionId - The session identifier
|
|
254
|
+
* @param transactionId - The transaction identifier
|
|
255
|
+
* @param channel - The channel identifier
|
|
256
|
+
* @param componentVersion - The component version
|
|
257
|
+
* @param useCase - The use case
|
|
258
|
+
* @param useCaseStep - The use case step
|
|
259
|
+
* @param user - The user identifier
|
|
260
|
+
* @param device - The device identifier(s)
|
|
261
|
+
* @param public_ - Public identifier
|
|
262
|
+
* @param opt - Optional logging options
|
|
263
|
+
* @param stack - Optional error stack trace array
|
|
264
|
+
* @returns The created summary LoggerDto object
|
|
265
|
+
*/
|
|
266
|
+
private createSummaryLog;
|
|
267
|
+
/**
|
|
268
|
+
* Pushes log data to OpenTelemetry Logs API.
|
|
269
|
+
* Emits a log record with structured attributes for observability platforms.
|
|
270
|
+
*
|
|
271
|
+
* @param loggerDetail - The logger DTO containing log details
|
|
272
|
+
* @param severityNumber - The OpenTelemetry severity level
|
|
273
|
+
*/
|
|
274
|
+
private pushLogToOpenTelemetry;
|
|
275
|
+
/**
|
|
276
|
+
* Records telemetry data to OpenTelemetry for monitoring and observability.
|
|
277
|
+
* Creates metrics (counter, histogram) and a distributed trace span with operation details.
|
|
278
|
+
* Skips recording if the result code is in the ignore list.
|
|
279
|
+
*
|
|
280
|
+
* @param appResultCode - The result code to record
|
|
281
|
+
* @param appResult - The result description
|
|
282
|
+
* @param recordName - The record identifier
|
|
283
|
+
* @param useCase - The use case being executed
|
|
284
|
+
* @param serviceTime - The service processing time in milliseconds
|
|
285
|
+
* @param originateServiceName - The originating service name
|
|
286
|
+
* @param success - Whether the operation was successful
|
|
287
|
+
* @param stack - Optional error stack trace array
|
|
288
|
+
*/
|
|
289
|
+
private recordTelemetry;
|
|
290
|
+
/**
|
|
291
|
+
* Transforms JSON values during serialization by converting empty strings to 'none'.
|
|
292
|
+
* Used as a JSON.stringify replacer function to ensure consistent default values.
|
|
293
|
+
*
|
|
294
|
+
* @param key - The JSON key being processed
|
|
295
|
+
* @param value - The value to transform
|
|
296
|
+
* @returns The transformed value ('none' if empty string, otherwise the original value)
|
|
297
|
+
*/
|
|
298
|
+
jsonTransformer(key: string, value: string): string;
|
|
299
|
+
}
|