Skip to content

Commit 249564f

Browse files
committed
Execute RequestId function for every log
1 parent 0cf717e commit 249564f

21 files changed

+193
-1109
lines changed

docs/api_extractor/tslog.api.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export interface ILogObjectStringifiable extends ILogObject {
108108
}
109109

110110
// @public
111-
export interface ISettings extends ISettingsParamWithRequestId {
111+
export interface ISettings extends ISettingsParam {
112112
// (undocumented)
113113
dateTimePattern: string;
114114
// (undocumented)
@@ -162,7 +162,7 @@ export interface ISettings extends ISettingsParamWithRequestId {
162162
// (undocumented)
163163
printLogMessageInNewLine: boolean;
164164
// (undocumented)
165-
requestId?: string;
165+
requestId?: string | TRequestIdFunction;
166166
// (undocumented)
167167
setCallerAsLoggerName: boolean;
168168
// (undocumented)
@@ -211,12 +211,6 @@ export interface ISettingsParam {
211211
type?: "json" | "pretty";
212212
}
213213

214-
// @public
215-
export interface ISettingsParamWithRequestId extends ISettingsParam {
216-
// (undocumented)
217-
requestId?: string;
218-
}
219-
220214
// @public
221215
export interface IStackFrame {
222216
columnNumber: number | null;

docs/tsdoc/assets/js/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tsdoc/classes/logger.html

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ <h3>constructor</h3>
124124
<li class="tsd-description">
125125
<aside class="tsd-sources">
126126
<ul>
127-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L78">index.ts:78</a></li>
127+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L76">index.ts:76</a></li>
128128
</ul>
129129
</aside>
130130
<div class="tsd-comment tsd-typography">
@@ -160,7 +160,7 @@ <h3>settings</h3>
160160
<li class="tsd-description">
161161
<aside class="tsd-sources">
162162
<ul>
163-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L158">index.ts:158</a></li>
163+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L156">index.ts:156</a></li>
164164
</ul>
165165
</aside>
166166
<div class="tsd-comment tsd-typography">
@@ -185,7 +185,7 @@ <h3>attach<wbr>Transport</h3>
185185
<li class="tsd-description">
186186
<aside class="tsd-sources">
187187
<ul>
188-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L253">index.ts:253</a></li>
188+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L247">index.ts:247</a></li>
189189
</ul>
190190
</aside>
191191
<div class="tsd-comment tsd-typography">
@@ -222,7 +222,7 @@ <h3>debug</h3>
222222
<li class="tsd-description">
223223
<aside class="tsd-sources">
224224
<ul>
225-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L283">index.ts:283</a></li>
225+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L277">index.ts:277</a></li>
226226
</ul>
227227
</aside>
228228
<div class="tsd-comment tsd-typography">
@@ -253,7 +253,7 @@ <h3>error</h3>
253253
<li class="tsd-description">
254254
<aside class="tsd-sources">
255255
<ul>
256-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L307">index.ts:307</a></li>
256+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L301">index.ts:301</a></li>
257257
</ul>
258258
</aside>
259259
<div class="tsd-comment tsd-typography">
@@ -284,7 +284,7 @@ <h3>fatal</h3>
284284
<li class="tsd-description">
285285
<aside class="tsd-sources">
286286
<ul>
287-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L315">index.ts:315</a></li>
287+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L309">index.ts:309</a></li>
288288
</ul>
289289
</aside>
290290
<div class="tsd-comment tsd-typography">
@@ -315,7 +315,7 @@ <h3>get<wbr>Child<wbr>Logger</h3>
315315
<li class="tsd-description">
316316
<aside class="tsd-sources">
317317
<ul>
318-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L238">index.ts:238</a></li>
318+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L232">index.ts:232</a></li>
319319
</ul>
320320
</aside>
321321
<div class="tsd-comment tsd-typography">
@@ -346,7 +346,7 @@ <h3>info</h3>
346346
<li class="tsd-description">
347347
<aside class="tsd-sources">
348348
<ul>
349-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L291">index.ts:291</a></li>
349+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L285">index.ts:285</a></li>
350350
</ul>
351351
</aside>
352352
<div class="tsd-comment tsd-typography">
@@ -377,7 +377,7 @@ <h3>pretty<wbr>Error</h3>
377377
<li class="tsd-description">
378378
<aside class="tsd-sources">
379379
<ul>
380-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L329">index.ts:329</a></li>
380+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L323">index.ts:323</a></li>
381381
</ul>
382382
</aside>
383383
<div class="tsd-comment tsd-typography">
@@ -444,7 +444,7 @@ <h3>set<wbr>Settings</h3>
444444
<li class="tsd-description">
445445
<aside class="tsd-sources">
446446
<ul>
447-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L175">index.ts:175</a></li>
447+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L173">index.ts:173</a></li>
448448
</ul>
449449
</aside>
450450
<div class="tsd-comment tsd-typography">
@@ -482,7 +482,7 @@ <h3>silly</h3>
482482
<li class="tsd-description">
483483
<aside class="tsd-sources">
484484
<ul>
485-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L267">index.ts:267</a></li>
485+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L261">index.ts:261</a></li>
486486
</ul>
487487
</aside>
488488
<div class="tsd-comment tsd-typography">
@@ -513,7 +513,7 @@ <h3>trace</h3>
513513
<li class="tsd-description">
514514
<aside class="tsd-sources">
515515
<ul>
516-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L275">index.ts:275</a></li>
516+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L269">index.ts:269</a></li>
517517
</ul>
518518
</aside>
519519
<div class="tsd-comment tsd-typography">
@@ -544,7 +544,7 @@ <h3>warn</h3>
544544
<li class="tsd-description">
545545
<aside class="tsd-sources">
546546
<ul>
547-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/index.ts#L299">index.ts:299</a></li>
547+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/index.ts#L293">index.ts:293</a></li>
548548
</ul>
549549
</aside>
550550
<div class="tsd-comment tsd-typography">
@@ -655,9 +655,6 @@ <h4 class="tsd-returns-title">Returns <a href="../interfaces/ilogobject.html" cl
655655
<li class=" tsd-kind-interface">
656656
<a href="../interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
657657
</li>
658-
<li class=" tsd-kind-interface">
659-
<a href="../interfaces/isettingsparamwithrequestid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Request<wbr>Id</a>
660-
</li>
661658
<li class=" tsd-kind-interface">
662659
<a href="../interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
663660
</li>

docs/tsdoc/globals.html

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ <h3>Interfaces</h3>
8282
<li class="tsd-kind-interface"><a href="interfaces/ilogobjectstringifiable.html" class="tsd-kind-icon">ILog<wbr>Object<wbr>Stringifiable</a></li>
8383
<li class="tsd-kind-interface"><a href="interfaces/isettings.html" class="tsd-kind-icon">ISettings</a></li>
8484
<li class="tsd-kind-interface"><a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a></li>
85-
<li class="tsd-kind-interface"><a href="interfaces/isettingsparamwithrequestid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Request<wbr>Id</a></li>
8685
<li class="tsd-kind-interface"><a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a></li>
8786
<li class="tsd-kind-interface"><a href="interfaces/istd.html" class="tsd-kind-icon">IStd</a></li>
8887
<li class="tsd-kind-interface"><a href="interfaces/itransportprovider.html" class="tsd-kind-icon">ITransport<wbr>Provider</a></li>
@@ -117,7 +116,7 @@ <h3>TLog<wbr>Level<wbr>Color</h3>
117116
<div class="tsd-signature tsd-kind-icon">TLog<wbr>Level<wbr>Color<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span></div>
118117
<aside class="tsd-sources">
119118
<ul>
120-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L34">interfaces.ts:34</a></li>
119+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L34">interfaces.ts:34</a></li>
121120
</ul>
122121
</aside>
123122
<div class="tsd-comment tsd-typography">
@@ -137,7 +136,7 @@ <h3>TLog<wbr>Level<wbr>Id</h3>
137136
<div class="tsd-signature tsd-kind-icon">TLog<wbr>Level<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">keyof </span><a href="interfaces/iloglevel.html" class="tsd-signature-type">ILogLevel</a></div>
138137
<aside class="tsd-sources">
139138
<ul>
140-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L22">interfaces.ts:22</a></li>
139+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L22">interfaces.ts:22</a></li>
141140
</ul>
142141
</aside>
143142
<div class="tsd-comment tsd-typography">
@@ -152,7 +151,7 @@ <h3>TLog<wbr>Level<wbr>Name</h3>
152151
<div class="tsd-signature tsd-kind-icon">TLog<wbr>Level<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ILogLevel</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">TLogLevelId</span><span class="tsd-signature-symbol">]</span></div>
153152
<aside class="tsd-sources">
154153
<ul>
155-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L28">interfaces.ts:28</a></li>
154+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L28">interfaces.ts:28</a></li>
156155
</ul>
157156
</aside>
158157
<div class="tsd-comment tsd-typography">
@@ -167,7 +166,7 @@ <h3>TRequest<wbr>IdFunction</h3>
167166
<div class="tsd-signature tsd-kind-icon">TRequest<wbr>IdFunction<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">string</span></div>
168167
<aside class="tsd-sources">
169168
<ul>
170-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L42">interfaces.ts:42</a></li>
169+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L42">interfaces.ts:42</a></li>
171170
</ul>
172171
</aside>
173172
<div class="tsd-comment tsd-typography">
@@ -197,7 +196,7 @@ <h3>TTransport<wbr>Logger</h3>
197196
<div class="tsd-signature tsd-kind-icon">TTransport<wbr>Logger&lt;T&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{}</span></div>
198197
<aside class="tsd-sources">
199198
<ul>
200-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L298">interfaces.ts:298</a></li>
199+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L290">interfaces.ts:290</a></li>
201200
</ul>
202201
</aside>
203202
<div class="tsd-comment tsd-typography">
@@ -223,7 +222,7 @@ <h3>TUtils<wbr>Inspect<wbr>Colors</h3>
223222
<div class="tsd-signature tsd-kind-icon">TUtils<wbr>Inspect<wbr>Colors<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"reset"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bold"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"dim"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"italic"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"underline"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"blink"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"inverse"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"hidden"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"strikethrough"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"doubleunderline"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"black"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"red"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"green"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"yellow"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"blue"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"magenta"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"cyan"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"white"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgBlack"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgRed"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgGreen"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgYellow"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgBlue"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgMagenta"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgCyan"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgWhite"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"framed"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"overlined"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"gray"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"grey"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"redBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"greenBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"yellowBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"blueBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"magentaBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"cyanBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"whiteBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgGray"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgRedBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgGreenBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgYellowBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgBlueBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgMagentaBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgCyanBright"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"bgWhiteBright"</span></div>
224223
<aside class="tsd-sources">
225224
<ul>
226-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L311">interfaces.ts:311</a></li>
225+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L303">interfaces.ts:303</a></li>
227226
</ul>
228227
</aside>
229228
<div class="tsd-comment tsd-typography">
@@ -238,7 +237,7 @@ <h3>With<wbr>Millisecond</h3>
238237
<div class="tsd-signature tsd-kind-icon">With<wbr>Millisecond&lt;T&gt;<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">T</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-type">"millisecond"</span></div>
239238
<aside class="tsd-sources">
240239
<ul>
241-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L391">interfaces.ts:391</a></li>
240+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L383">interfaces.ts:383</a></li>
242241
</ul>
243242
</aside>
244243
<h4 class="tsd-type-parameters-title">Type parameters</h4>
@@ -257,7 +256,7 @@ <h3>Date<wbr>Time<wbr>Format<wbr>Part<wbr>Types</h3>
257256
<div class="tsd-signature tsd-kind-icon">Date<wbr>Time<wbr>Format<wbr>Part<wbr>Types<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
258257
<aside class="tsd-sources">
259258
<ul>
260-
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/c6c3231/src/interfaces.ts#L2">interfaces.ts:2</a></li>
259+
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/0cf717e/src/interfaces.ts#L2">interfaces.ts:2</a></li>
261260
</ul>
262261
</aside>
263262
</section>
@@ -306,9 +305,6 @@ <h3>Date<wbr>Time<wbr>Format<wbr>Part<wbr>Types</h3>
306305
<li class=" tsd-kind-interface">
307306
<a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
308307
</li>
309-
<li class=" tsd-kind-interface">
310-
<a href="interfaces/isettingsparamwithrequestid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Request<wbr>Id</a>
311-
</li>
312308
<li class=" tsd-kind-interface">
313309
<a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
314310
</li>

docs/tsdoc/index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,6 @@ <h5>prettyError</h5>
593593
<li class=" tsd-kind-interface">
594594
<a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
595595
</li>
596-
<li class=" tsd-kind-interface">
597-
<a href="interfaces/isettingsparamwithrequestid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Request<wbr>Id</a>
598-
</li>
599596
<li class=" tsd-kind-interface">
600597
<a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
601598
</li>

0 commit comments

Comments
 (0)