@jaypie/express 1.0.9 → 1.0.11

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/dist/module.cjs CHANGED
@@ -192,18 +192,21 @@ const expressHandler = (
192
192
 
193
193
  // Re-init the logger
194
194
  core.log.init();
195
+ // Very low-level, internal sub-trace details
196
+ const libLogger = core.log.lib({
197
+ lib: core.JAYPIE.LIB.EXPRESS,
198
+ });
195
199
 
196
200
  // Update the public logger with the request ID
197
201
  const invokeUuid = getCurrentInvokeUuid();
198
202
  if (invokeUuid) {
199
203
  core.log.tag({ invoke: invokeUuid });
200
204
  core.log.tag({ shortInvoke: invokeUuid.slice(0, 8) });
205
+ // TODO: in theory this is redundant
206
+ libLogger.tag({ invoke: invokeUuid });
207
+ libLogger.tag({ shortInvoke: invokeUuid.slice(0, 8) });
201
208
  }
202
209
 
203
- // Very low-level, internal sub-trace details
204
- const libLogger = core.log.lib({
205
- lib: core.JAYPIE.LIB.EXPRESS,
206
- });
207
210
  libLogger.trace("[jaypie] Express init");
208
211
 
209
212
  // Top-level, important details that run at the same level as the main logger
@@ -290,16 +293,14 @@ const expressHandler = (
290
293
  try {
291
294
  log.info.var({ req: summarizeRequest(req) });
292
295
 
293
- if (!jaypieFunction) {
294
- // Initialize after logging is set up
295
- jaypieFunction = core.jaypieHandler(handler, {
296
- name,
297
- setup,
298
- teardown,
299
- unavailable,
300
- validate,
301
- });
302
- }
296
+ // Initialize after logging is set up
297
+ jaypieFunction = core.jaypieHandler(handler, {
298
+ name,
299
+ setup,
300
+ teardown,
301
+ unavailable,
302
+ validate,
303
+ });
303
304
 
304
305
  libLogger.trace("[jaypie] Express execution");
305
306
 
@@ -190,18 +190,21 @@ const expressHandler = (
190
190
 
191
191
  // Re-init the logger
192
192
  log.init();
193
+ // Very low-level, internal sub-trace details
194
+ const libLogger = log.lib({
195
+ lib: JAYPIE.LIB.EXPRESS,
196
+ });
193
197
 
194
198
  // Update the public logger with the request ID
195
199
  const invokeUuid = getCurrentInvokeUuid();
196
200
  if (invokeUuid) {
197
201
  log.tag({ invoke: invokeUuid });
198
202
  log.tag({ shortInvoke: invokeUuid.slice(0, 8) });
203
+ // TODO: in theory this is redundant
204
+ libLogger.tag({ invoke: invokeUuid });
205
+ libLogger.tag({ shortInvoke: invokeUuid.slice(0, 8) });
199
206
  }
200
207
 
201
- // Very low-level, internal sub-trace details
202
- const libLogger = log.lib({
203
- lib: JAYPIE.LIB.EXPRESS,
204
- });
205
208
  libLogger.trace("[jaypie] Express init");
206
209
 
207
210
  // Top-level, important details that run at the same level as the main logger
@@ -288,16 +291,14 @@ const expressHandler = (
288
291
  try {
289
292
  log$1.info.var({ req: summarizeRequest(req) });
290
293
 
291
- if (!jaypieFunction) {
292
- // Initialize after logging is set up
293
- jaypieFunction = jaypieHandler(handler, {
294
- name,
295
- setup,
296
- teardown,
297
- unavailable,
298
- validate: validate$1,
299
- });
300
- }
294
+ // Initialize after logging is set up
295
+ jaypieFunction = jaypieHandler(handler, {
296
+ name,
297
+ setup,
298
+ teardown,
299
+ unavailable,
300
+ validate: validate$1,
301
+ });
301
302
 
302
303
  libLogger.trace("[jaypie] Express execution");
303
304
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/express",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "author": "Finlayson Studio",
5
5
  "type": "module",
6
6
  "exports": {
@@ -43,18 +43,21 @@ const expressHandler = (
43
43
 
44
44
  // Re-init the logger
45
45
  publicLogger.init();
46
+ // Very low-level, internal sub-trace details
47
+ const libLogger = publicLogger.lib({
48
+ lib: JAYPIE.LIB.EXPRESS,
49
+ });
46
50
 
47
51
  // Update the public logger with the request ID
48
52
  const invokeUuid = getCurrentInvokeUuid();
49
53
  if (invokeUuid) {
50
54
  publicLogger.tag({ invoke: invokeUuid });
51
55
  publicLogger.tag({ shortInvoke: invokeUuid.slice(0, 8) });
56
+ // TODO: in theory this is redundant
57
+ libLogger.tag({ invoke: invokeUuid });
58
+ libLogger.tag({ shortInvoke: invokeUuid.slice(0, 8) });
52
59
  }
53
60
 
54
- // Very low-level, internal sub-trace details
55
- const libLogger = publicLogger.lib({
56
- lib: JAYPIE.LIB.EXPRESS,
57
- });
58
61
  libLogger.trace("[jaypie] Express init");
59
62
 
60
63
  // Top-level, important details that run at the same level as the main logger
@@ -141,16 +144,14 @@ const expressHandler = (
141
144
  try {
142
145
  log.info.var({ req: summarizeRequest(req) });
143
146
 
144
- if (!jaypieFunction) {
145
- // Initialize after logging is set up
146
- jaypieFunction = jaypieHandler(handler, {
147
- name,
148
- setup,
149
- teardown,
150
- unavailable,
151
- validate,
152
- });
153
- }
147
+ // Initialize after logging is set up
148
+ jaypieFunction = jaypieHandler(handler, {
149
+ name,
150
+ setup,
151
+ teardown,
152
+ unavailable,
153
+ validate,
154
+ });
154
155
 
155
156
  libLogger.trace("[jaypie] Express execution");
156
157