@nicollasfrazao/liguelead-log-service 1.2.13 → 1.2.15
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.
|
@@ -8,7 +8,6 @@ import { LogType } from '../types/log.type';
|
|
|
8
8
|
*
|
|
9
9
|
* @property {FirehoseClient} firehose
|
|
10
10
|
* @property {LogStorageExternalS3ServiceConfigInterface} config
|
|
11
|
-
* @property {Map<string, Promise<void>>} writeQueue
|
|
12
11
|
* @property {Promise<any> | null} credentialsCache
|
|
13
12
|
*/
|
|
14
13
|
export declare class LogStorageExternalS3Service extends LogStorageExternalService {
|
|
@@ -20,22 +19,10 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
20
19
|
* @var {LogStorageExternalS3ServiceConfigInterface}
|
|
21
20
|
*/
|
|
22
21
|
private config;
|
|
23
|
-
/**
|
|
24
|
-
* @var {Map<string, Promise<void>>}
|
|
25
|
-
*/
|
|
26
|
-
private writeQueue;
|
|
27
22
|
/**
|
|
28
23
|
* @var {Promise<any> | null}
|
|
29
24
|
*/
|
|
30
25
|
private credentialsCache;
|
|
31
|
-
/**
|
|
32
|
-
* @var {number}
|
|
33
|
-
*/
|
|
34
|
-
private readonly maxRetries;
|
|
35
|
-
/**
|
|
36
|
-
* @var {number}
|
|
37
|
-
*/
|
|
38
|
-
private readonly baseDelay;
|
|
39
26
|
/**
|
|
40
27
|
* Constructor of the LogStorageS3Service
|
|
41
28
|
*
|
|
@@ -60,41 +47,6 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
60
47
|
* @returns {Promise<any>} Fresh credentials object for AWS SDK
|
|
61
48
|
*/
|
|
62
49
|
private refreshAssumeRoleCredentials;
|
|
63
|
-
/**
|
|
64
|
-
* Sleep for specified milliseconds
|
|
65
|
-
*
|
|
66
|
-
* @param {number} ms - Milliseconds to sleep
|
|
67
|
-
*
|
|
68
|
-
* @returns {Promise<void>}
|
|
69
|
-
*/
|
|
70
|
-
private sleep;
|
|
71
|
-
/**
|
|
72
|
-
* Execute operation with timeout
|
|
73
|
-
*
|
|
74
|
-
* @param {Function} operation - The operation to execute
|
|
75
|
-
* @param {number} timeoutMs - Timeout in milliseconds
|
|
76
|
-
*
|
|
77
|
-
* @returns {Promise<any>}
|
|
78
|
-
*/
|
|
79
|
-
private withTimeout;
|
|
80
|
-
/**
|
|
81
|
-
* Retry function with exponential backoff
|
|
82
|
-
*
|
|
83
|
-
* @param {Function} operation - The operation to retry
|
|
84
|
-
* @param {number} retries - Number of retries remaining
|
|
85
|
-
* @param {number} delay - Current delay in milliseconds
|
|
86
|
-
*
|
|
87
|
-
* @returns {Promise<any>}
|
|
88
|
-
*/
|
|
89
|
-
private retryWithBackoff;
|
|
90
|
-
/**
|
|
91
|
-
* Check if error is retryable
|
|
92
|
-
*
|
|
93
|
-
* @param {any} error - The error to check
|
|
94
|
-
*
|
|
95
|
-
* @returns {boolean}
|
|
96
|
-
*/
|
|
97
|
-
private isRetryableError;
|
|
98
50
|
/**
|
|
99
51
|
* Upload log content to Firehose (which delivers to S3)
|
|
100
52
|
*
|
|
@@ -105,8 +57,7 @@ export declare class LogStorageExternalS3Service extends LogStorageExternalServi
|
|
|
105
57
|
*/
|
|
106
58
|
private uploadLog;
|
|
107
59
|
/**
|
|
108
|
-
* Send log content to Firehose
|
|
109
|
-
* Firehose handles delivery to S3 with buffering and compression
|
|
60
|
+
* Send log content to Firehose
|
|
110
61
|
*
|
|
111
62
|
* @param {string} key The S3 key (path) for the log file (used for metadata)
|
|
112
63
|
* @param {LogType[]} data The new content to send
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.storage.external.s3.service.d.ts","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C
|
|
1
|
+
{"version":3,"file":"log.storage.external.s3.service.d.ts","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,SAAQ,yBAAyB;IAExE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAiB;IAEjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAA6C;IAE3D;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAA6B;IAErD;;;;OAIG;gBACU,gBAAgB,EAAE,yBAAyB;IAgCxD;;;;OAIG;IACI,SAAS,IAAI,OAAO;IAK3B;;;;OAIG;YACW,wBAAwB;IAqCtC;;;;OAIG;YACW,4BAA4B;IA8C1C;;;;;;;OAOG;YACW,SAAS;IAqCvB;;;;;;;OAOG;YACW,SAAS;IAyBvB;;;;;;OAMG;IACU,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BnD"}
|
|
@@ -14,7 +14,6 @@ const log_error_1 = require("../errors/log.error");
|
|
|
14
14
|
*
|
|
15
15
|
* @property {FirehoseClient} firehose
|
|
16
16
|
* @property {LogStorageExternalS3ServiceConfigInterface} config
|
|
17
|
-
* @property {Map<string, Promise<void>>} writeQueue
|
|
18
17
|
* @property {Promise<any> | null} credentialsCache
|
|
19
18
|
*/
|
|
20
19
|
class LogStorageExternalS3Service extends log_storage_external_service_1.LogStorageExternalService {
|
|
@@ -25,25 +24,16 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
25
24
|
*/
|
|
26
25
|
constructor(logServiceConfig) {
|
|
27
26
|
super(logServiceConfig);
|
|
28
|
-
/**
|
|
29
|
-
* @var {Map<string, Promise<void>>}
|
|
30
|
-
*/
|
|
31
|
-
this.writeQueue = new Map();
|
|
32
27
|
/**
|
|
33
28
|
* @var {Promise<any> | null}
|
|
34
29
|
*/
|
|
35
30
|
this.credentialsCache = null;
|
|
36
|
-
/**
|
|
37
|
-
* @var {number}
|
|
38
|
-
*/
|
|
39
|
-
this.maxRetries = 3;
|
|
40
|
-
/**
|
|
41
|
-
* @var {number}
|
|
42
|
-
*/
|
|
43
|
-
this.baseDelay = 1000;
|
|
44
31
|
this.config = (0, log_storage_external_s3_config_1.getLogStorageExternalS3Config)();
|
|
45
32
|
const firehoseConfig = {
|
|
46
|
-
region: this.config.region
|
|
33
|
+
region: this.config.region,
|
|
34
|
+
requestTimeout: 30000,
|
|
35
|
+
maxAttempts: 3,
|
|
36
|
+
retryMode: 'adaptive'
|
|
47
37
|
};
|
|
48
38
|
if (this.config.roleArn) {
|
|
49
39
|
firehoseConfig.credentials = () => this.getAssumeRoleCredentials();
|
|
@@ -109,17 +99,17 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
109
99
|
async refreshAssumeRoleCredentials() {
|
|
110
100
|
const stsClient = new client_sts_1.STSClient({
|
|
111
101
|
region: this.config.region,
|
|
112
|
-
endpoint: this.config.endpoint
|
|
102
|
+
endpoint: this.config.endpoint,
|
|
103
|
+
maxAttempts: 3,
|
|
104
|
+
retryMode: 'adaptive'
|
|
113
105
|
});
|
|
114
106
|
const command = new client_sts_1.AssumeRoleCommand({
|
|
115
107
|
RoleArn: this.config.roleArn,
|
|
116
108
|
RoleSessionName: `log-service-session-${Date.now()}`,
|
|
117
|
-
DurationSeconds: 3600,
|
|
109
|
+
DurationSeconds: 3600,
|
|
118
110
|
});
|
|
119
111
|
try {
|
|
120
|
-
const response = await
|
|
121
|
-
return stsClient.send(command);
|
|
122
|
-
});
|
|
112
|
+
const response = await stsClient.send(command);
|
|
123
113
|
if (!response.Credentials) {
|
|
124
114
|
throw new log_error_1.LogError('Failed to retrieve credentials from STS AssumeRole');
|
|
125
115
|
}
|
|
@@ -131,140 +121,15 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
131
121
|
};
|
|
132
122
|
}
|
|
133
123
|
catch (error) {
|
|
134
|
-
console.error('Failed to assume role
|
|
124
|
+
console.error('Failed to assume role:', {
|
|
135
125
|
error: error.message,
|
|
136
126
|
code: error.code,
|
|
137
|
-
statusCode: error.$metadata?.httpStatusCode
|
|
138
|
-
retryable: this.isRetryableError(error)
|
|
127
|
+
statusCode: error.$metadata?.httpStatusCode
|
|
139
128
|
});
|
|
140
129
|
this.credentialsCache = null;
|
|
141
130
|
throw error;
|
|
142
131
|
}
|
|
143
132
|
}
|
|
144
|
-
/**
|
|
145
|
-
* Sleep for specified milliseconds
|
|
146
|
-
*
|
|
147
|
-
* @param {number} ms - Milliseconds to sleep
|
|
148
|
-
*
|
|
149
|
-
* @returns {Promise<void>}
|
|
150
|
-
*/
|
|
151
|
-
sleep(ms) {
|
|
152
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Execute operation with timeout
|
|
156
|
-
*
|
|
157
|
-
* @param {Function} operation - The operation to execute
|
|
158
|
-
* @param {number} timeoutMs - Timeout in milliseconds
|
|
159
|
-
*
|
|
160
|
-
* @returns {Promise<any>}
|
|
161
|
-
*/
|
|
162
|
-
async withTimeout(operation, timeoutMs = 30000) {
|
|
163
|
-
const controller = new AbortController();
|
|
164
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
165
|
-
try {
|
|
166
|
-
const result = await operation();
|
|
167
|
-
clearTimeout(timeoutId);
|
|
168
|
-
return result;
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
clearTimeout(timeoutId);
|
|
172
|
-
if (controller.signal.aborted) {
|
|
173
|
-
const timeoutError = new log_error_1.LogError(`Operation timed out after ${timeoutMs}ms`);
|
|
174
|
-
timeoutError.name = 'TimeoutError';
|
|
175
|
-
throw timeoutError;
|
|
176
|
-
}
|
|
177
|
-
throw error;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Retry function with exponential backoff
|
|
182
|
-
*
|
|
183
|
-
* @param {Function} operation - The operation to retry
|
|
184
|
-
* @param {number} retries - Number of retries remaining
|
|
185
|
-
* @param {number} delay - Current delay in milliseconds
|
|
186
|
-
*
|
|
187
|
-
* @returns {Promise<any>}
|
|
188
|
-
*/
|
|
189
|
-
async retryWithBackoff(operation, retries = this.maxRetries, delay = this.baseDelay) {
|
|
190
|
-
try {
|
|
191
|
-
return await this.withTimeout(operation);
|
|
192
|
-
}
|
|
193
|
-
catch (error) {
|
|
194
|
-
if (retries === 0) {
|
|
195
|
-
throw error;
|
|
196
|
-
}
|
|
197
|
-
const isRetryable = this.isRetryableError(error);
|
|
198
|
-
console.debug(`Retryable check for error: ${isRetryable}`, {
|
|
199
|
-
error: error.message,
|
|
200
|
-
code: error.code,
|
|
201
|
-
name: error.name
|
|
202
|
-
});
|
|
203
|
-
if (!isRetryable) {
|
|
204
|
-
throw error;
|
|
205
|
-
}
|
|
206
|
-
console.warn(`Firehose operation failed, retrying in ${delay}ms. Retries left: ${retries}`, {
|
|
207
|
-
error: error.message,
|
|
208
|
-
code: error.code,
|
|
209
|
-
name: error.name,
|
|
210
|
-
retryAttempt: this.maxRetries - retries + 1
|
|
211
|
-
});
|
|
212
|
-
await this.sleep(delay);
|
|
213
|
-
const jitter = Math.random() * 0.1 * delay;
|
|
214
|
-
const nextDelay = delay * 2 + jitter;
|
|
215
|
-
return this.retryWithBackoff(operation, retries - 1, nextDelay);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Check if error is retryable
|
|
220
|
-
*
|
|
221
|
-
* @param {any} error - The error to check
|
|
222
|
-
*
|
|
223
|
-
* @returns {boolean}
|
|
224
|
-
*/
|
|
225
|
-
isRetryableError(error) {
|
|
226
|
-
const retryableCodes = [
|
|
227
|
-
'ECONNRESET',
|
|
228
|
-
'ECONNREFUSED',
|
|
229
|
-
'ETIMEDOUT',
|
|
230
|
-
'EPIPE',
|
|
231
|
-
'EHOSTUNREACH',
|
|
232
|
-
'ENETUNREACH',
|
|
233
|
-
'EAI_AGAIN'
|
|
234
|
-
];
|
|
235
|
-
const retryableMessages = [
|
|
236
|
-
'socket hang up',
|
|
237
|
-
'network timeout',
|
|
238
|
-
'connection timeout',
|
|
239
|
-
'write EPIPE',
|
|
240
|
-
'read ECONNRESET',
|
|
241
|
-
'operation timed out'
|
|
242
|
-
];
|
|
243
|
-
if (error.code
|
|
244
|
-
&& retryableCodes.includes(error.code)) {
|
|
245
|
-
return true;
|
|
246
|
-
}
|
|
247
|
-
if (error.name === 'TimeoutError') {
|
|
248
|
-
return true;
|
|
249
|
-
}
|
|
250
|
-
if (error.message) {
|
|
251
|
-
const message = error.message.toLowerCase();
|
|
252
|
-
const hasRetryableMessage = retryableMessages.some(msg => message.includes(msg));
|
|
253
|
-
if (hasRetryableMessage) {
|
|
254
|
-
return true;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
if (error.$metadata?.httpStatusCode) {
|
|
258
|
-
const statusCode = error.$metadata.httpStatusCode;
|
|
259
|
-
return statusCode >= 500
|
|
260
|
-
|| statusCode === 429;
|
|
261
|
-
}
|
|
262
|
-
if (error.name === 'NetworkError'
|
|
263
|
-
|| error.name === 'NetworkingError') {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
133
|
/**
|
|
269
134
|
* Upload log content to Firehose (which delivers to S3)
|
|
270
135
|
*
|
|
@@ -282,36 +147,24 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
282
147
|
const logEntry = log_service_1.LogService.formatLog(log);
|
|
283
148
|
return { Data: Buffer.from(logEntry + '\n', 'utf8') };
|
|
284
149
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
DeliveryStreamName: this.config.firehoseStreamName,
|
|
289
|
-
Records: records
|
|
290
|
-
});
|
|
291
|
-
const startTime = Date.now();
|
|
292
|
-
const result = await this.firehose.send(command);
|
|
293
|
-
const duration = Date.now() - startTime;
|
|
294
|
-
console.debug(`Firehose batch sent successfully in ${duration}ms`, {
|
|
295
|
-
batchSize: records.length,
|
|
296
|
-
failedRecordCount: result.FailedPutCount || 0
|
|
297
|
-
});
|
|
298
|
-
return result;
|
|
150
|
+
const command = new client_firehose_1.PutRecordBatchCommand({
|
|
151
|
+
DeliveryStreamName: this.config.firehoseStreamName,
|
|
152
|
+
Records: records
|
|
299
153
|
});
|
|
154
|
+
await this.firehose.send(command);
|
|
300
155
|
}
|
|
301
156
|
}
|
|
302
157
|
catch (error) {
|
|
303
|
-
console.error(`Failed to upload log to Firehose
|
|
158
|
+
console.error(`Failed to upload log to Firehose: ${key}`, {
|
|
304
159
|
error: error.message,
|
|
305
160
|
code: error.code,
|
|
306
|
-
statusCode: error.$metadata?.httpStatusCode
|
|
307
|
-
retryable: this.isRetryableError(error)
|
|
161
|
+
statusCode: error.$metadata?.httpStatusCode
|
|
308
162
|
});
|
|
309
163
|
throw error;
|
|
310
164
|
}
|
|
311
165
|
}
|
|
312
166
|
/**
|
|
313
|
-
* Send log content to Firehose
|
|
314
|
-
* Firehose handles delivery to S3 with buffering and compression
|
|
167
|
+
* Send log content to Firehose
|
|
315
168
|
*
|
|
316
169
|
* @param {string} key The S3 key (path) for the log file (used for metadata)
|
|
317
170
|
* @param {LogType[]} data The new content to send
|
|
@@ -319,29 +172,20 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
319
172
|
* @returns {Promise<void>}
|
|
320
173
|
*/
|
|
321
174
|
async appendLog(key, data) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
337
|
-
throw error;
|
|
338
|
-
}
|
|
339
|
-
finally {
|
|
340
|
-
this.writeQueue.delete(key);
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
this.writeQueue.set(key, newOperation);
|
|
344
|
-
return newOperation;
|
|
175
|
+
try {
|
|
176
|
+
await this.uploadLog(key, data);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.error(`Failed to send log to Firehose: ${key}`, {
|
|
180
|
+
error: error.message,
|
|
181
|
+
code: error.code,
|
|
182
|
+
statusCode: error.$metadata?.httpStatusCode,
|
|
183
|
+
requestId: error.$metadata?.requestId,
|
|
184
|
+
batchSize: data.length,
|
|
185
|
+
timestamp: new Date().toISOString()
|
|
186
|
+
});
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
345
189
|
}
|
|
346
190
|
/**
|
|
347
191
|
* Writes a log entry to S3 via Firehose
|
|
@@ -353,17 +197,7 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
353
197
|
async write(data) {
|
|
354
198
|
try {
|
|
355
199
|
const combinedFilePath = this.getCombinedLogFilePath();
|
|
356
|
-
console.debug(`Attempting to write ${data.length} log entries to Firehose`, {
|
|
357
|
-
stream: this.config.firehoseStreamName,
|
|
358
|
-
region: this.config.region,
|
|
359
|
-
filePath: combinedFilePath,
|
|
360
|
-
timestamp: new Date().toISOString()
|
|
361
|
-
});
|
|
362
200
|
await this.appendLog(combinedFilePath, data);
|
|
363
|
-
console.debug(`Successfully wrote ${data.length} log entries to Firehose`, {
|
|
364
|
-
stream: this.config.firehoseStreamName,
|
|
365
|
-
timestamp: new Date().toISOString()
|
|
366
|
-
});
|
|
367
201
|
}
|
|
368
202
|
catch (error) {
|
|
369
203
|
console.error('Failed to write log to Firehose/S3 storage:', {
|
|
@@ -374,7 +208,6 @@ class LogStorageExternalS3Service extends log_storage_external_service_1.LogStor
|
|
|
374
208
|
requestId: error.$metadata?.requestId,
|
|
375
209
|
stream: this.config.firehoseStreamName,
|
|
376
210
|
region: this.config.region,
|
|
377
|
-
retryable: this.isRetryableError(error),
|
|
378
211
|
timestamp: new Date().toISOString()
|
|
379
212
|
});
|
|
380
213
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.storage.external.s3.service.js","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":";;;AAAA,8DAAiF;AACjF,oDAAmE;AACnE,iFAA2E;AAG3E,+CAA2C;AAE3C,8FAA0F;AAC1F,mDAA+C;AAE/C
|
|
1
|
+
{"version":3,"file":"log.storage.external.s3.service.js","sourceRoot":"","sources":["../../src/services/log.storage.external.s3.service.ts"],"names":[],"mappings":";;;AAAA,8DAAiF;AACjF,oDAAmE;AACnE,iFAA2E;AAG3E,+CAA2C;AAE3C,8FAA0F;AAC1F,mDAA+C;AAE/C;;;;;;;;GAQG;AACH,MAAa,2BAA4B,SAAQ,wDAAyB;IAiBxE;;;;OAIG;IACH,YAAa,gBAA2C;QAEtD,KAAK,CAAE,gBAAgB,CAAC,CAAC;QAZ3B;;WAEG;QACK,qBAAgB,GAAwB,IAAI,CAAC;QAWnD,IAAI,CAAC,MAAM,GAAG,IAAA,8DAA6B,GAAE,CAAC;QAE9C,MAAM,cAAc,GAAQ;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,cAAc,EAAE,KAAK;YACrB,WAAW,EAAE,CAAC;YACd,SAAS,EAAE,UAAU;SACtB,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACxB,cAAc,CAAC,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QACrE,CAAC;aAAM,IACL,IAAI,CAAC,MAAM,CAAC,WAAW;eACpB,IAAI,CAAC,MAAM,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,MAAM,CAAC,kBAAkB;gBACtC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC1B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CACF,CAAC;YAEF,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA7QD,kEA6QC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicollasfrazao/liguelead-log-service",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
4
4
|
"description": "A standalone logging service for Express applications with multi-destination storage (local files + S3 via Kinesis Firehose) and comprehensive request tracking using strategy pattern.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|