Skip to content

Commit

Permalink
Generate traceId on setSettings()
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Jun 16, 2020
1 parent eb814de commit 038d610
Show file tree
Hide file tree
Showing 21 changed files with 1,033 additions and 190 deletions.
10 changes: 6 additions & 4 deletions docs/api_extractor/tslog.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ export interface ILogObjectStringifiable extends ILogObject {
argumentsArray: (IErrorObjectStringified | string)[];
}

// Warning: (ae-forgotten-export) The symbol "ISettingsParamWithTraceId" needs to be exported by the entry point index.d.ts
//
// @public
export interface ISettings extends ISettingsParam {
export interface ISettings extends ISettingsParamWithTraceId {
// (undocumented)
dateTimePattern: string;
// (undocumented)
Expand Down Expand Up @@ -161,10 +163,8 @@ export interface ISettings extends ISettingsParam {
stdOut: IStd;
// (undocumented)
suppressStdOutput: boolean;
// Warning: (ae-forgotten-export) The symbol "TTraceIdFunction" needs to be exported by the entry point index.d.ts
//
// (undocumented)
traceId?: string | TTraceIdFunction;
traceId?: string;
// (undocumented)
type: "json" | "pretty";
}
Expand Down Expand Up @@ -198,6 +198,8 @@ export interface ISettingsParam {
stdErr?: IStd;
stdOut?: IStd;
suppressStdOutput?: boolean;
// Warning: (ae-forgotten-export) The symbol "TTraceIdFunction" needs to be exported by the entry point index.d.ts
//
// (undocumented)
traceId?: string | TTraceIdFunction;
type?: "json" | "pretty";
Expand Down
2 changes: 1 addition & 1 deletion docs/tsdoc/assets/js/search.json

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions docs/tsdoc/classes/logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L69">index.ts:69</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L70">index.ts:70</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -160,7 +160,7 @@ <h3>settings</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L145">index.ts:145</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L146">index.ts:146</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -185,7 +185,7 @@ <h3>attach<wbr>Transport</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L206">index.ts:206</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L214">index.ts:214</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -222,7 +222,7 @@ <h3>debug</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L236">index.ts:236</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L244">index.ts:244</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -253,7 +253,7 @@ <h3>error</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L260">index.ts:260</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L268">index.ts:268</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -284,7 +284,7 @@ <h3>fatal</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L268">index.ts:268</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L276">index.ts:276</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -315,7 +315,7 @@ <h3>get<wbr>Child<wbr>Logger</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L191">index.ts:191</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L199">index.ts:199</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -338,7 +338,7 @@ <h3>info</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L244">index.ts:244</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L252">index.ts:252</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -369,7 +369,7 @@ <h3>pretty<wbr>Error</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L282">index.ts:282</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L290">index.ts:290</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -436,7 +436,7 @@ <h3>set<wbr>Settings</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L155">index.ts:155</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L156">index.ts:156</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -462,7 +462,7 @@ <h3>silly</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L220">index.ts:220</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L228">index.ts:228</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -493,7 +493,7 @@ <h3>trace</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L228">index.ts:228</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L236">index.ts:236</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -524,7 +524,7 @@ <h3>warn</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/index.ts#L252">index.ts:252</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/index.ts#L260">index.ts:260</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -635,6 +635,9 @@ <h4 class="tsd-returns-title">Returns <a href="../interfaces/ilogobject.html" cl
<li class=" tsd-kind-interface">
<a href="../interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/isettingsparamwithtraceid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Trace<wbr>Id</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
</li>
Expand Down
20 changes: 12 additions & 8 deletions docs/tsdoc/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ <h3>Interfaces</h3>
<li class="tsd-kind-interface"><a href="interfaces/ilogobjectstringifiable.html" class="tsd-kind-icon">ILog<wbr>Object<wbr>Stringifiable</a></li>
<li class="tsd-kind-interface"><a href="interfaces/isettings.html" class="tsd-kind-icon">ISettings</a></li>
<li class="tsd-kind-interface"><a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a></li>
<li class="tsd-kind-interface"><a href="interfaces/isettingsparamwithtraceid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Trace<wbr>Id</a></li>
<li class="tsd-kind-interface"><a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a></li>
<li class="tsd-kind-interface"><a href="interfaces/istd.html" class="tsd-kind-icon">IStd</a></li>
<li class="tsd-kind-interface"><a href="interfaces/itransportprovider.html" class="tsd-kind-icon">ITransport<wbr>Provider</a></li>
Expand Down Expand Up @@ -116,7 +117,7 @@ <h3>TLog<wbr>Level<wbr>Color</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L34">interfaces.ts:34</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L34">interfaces.ts:34</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -136,7 +137,7 @@ <h3>TLog<wbr>Level<wbr>Id</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L22">interfaces.ts:22</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L22">interfaces.ts:22</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -151,7 +152,7 @@ <h3>TLog<wbr>Level<wbr>Name</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L28">interfaces.ts:28</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L28">interfaces.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -166,7 +167,7 @@ <h3>TTrace<wbr>IdFunction</h3>
<div class="tsd-signature tsd-kind-icon">TTrace<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L38">interfaces.ts:38</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L38">interfaces.ts:38</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
Expand All @@ -191,7 +192,7 @@ <h3>TTransport<wbr>Logger</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L265">interfaces.ts:265</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L269">interfaces.ts:269</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -217,7 +218,7 @@ <h3>TUtils<wbr>Inspect<wbr>Colors</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L278">interfaces.ts:278</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L282">interfaces.ts:282</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -232,7 +233,7 @@ <h3>With<wbr>Millisecond</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L358">interfaces.ts:358</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L362">interfaces.ts:362</a></li>
</ul>
</aside>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
Expand All @@ -251,7 +252,7 @@ <h3>Date<wbr>Time<wbr>Format<wbr>Part<wbr>Types</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/d1de7cf/src/interfaces.ts#L2">interfaces.ts:2</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/eb814de/src/interfaces.ts#L2">interfaces.ts:2</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -300,6 +301,9 @@ <h3>Date<wbr>Time<wbr>Format<wbr>Part<wbr>Types</h3>
<li class=" tsd-kind-interface">
<a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/isettingsparamwithtraceid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Trace<wbr>Id</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions docs/tsdoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ <h5>prettyError</h5>
<li class=" tsd-kind-interface">
<a href="interfaces/isettingsparam.html" class="tsd-kind-icon">ISettings<wbr>Param</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/isettingsparamwithtraceid.html" class="tsd-kind-icon">ISettings<wbr>Param<wbr>With<wbr>Trace<wbr>Id</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/istackframe.html" class="tsd-kind-icon">IStack<wbr>Frame</a>
</li>
Expand Down
Loading

0 comments on commit 038d610

Please sign in to comment.