Skip to content

Commit

Permalink
Merge pull request #1 from fullstack-build/development
Browse files Browse the repository at this point in the history
Increased compatibility to Node.js >= 8
  • Loading branch information
terehov authored Apr 30, 2020
2 parents c97f525 + 20b58b3 commit e25eaa6
Show file tree
Hide file tree
Showing 34 changed files with 560 additions and 413 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ log.fatal(new Error("I am a pretty Error with a stacktrace."));
* **Named Logger:** Logger can be named (e.g. useful for packages/modules and monorepos)
* **Highly configurable:** All settings can be changed through a typed object
* **Short paths:** Paths are relative to the root of the application folder
* **Runtime-agnostic:** Works with `ts-node`, `ts-node-dev`, as well as compiled down to JavaScript
* **Optionally overwrite `console`:** Catch `console.log` etc. that would otherwise be hard to find
* **Tested:** 100% code coverage, CI

Expand Down
Binary file modified docs/assets/tslog_code_frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/tslog_pretty_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>tslog - 📝 Expressive TypeScript Logger for Node.js: Call locations, pretty Errors, stack traces code frames. JSON output and transports.</title>
<title>tslog - 📝 Expressive TypeScript Logger for Node.js: Pretty errors, stack traces, code frames, and JSON output to attachable transports.</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="tslog - Expressive TypeScript Logger for Node.js: Call locations, pretty Errors, stack traces code frames. JSON output and transports.">
<meta name="description" content="tslog - Expressive TypeScript Logger for Node.js: Pretty errors, stack traces, code frames, and JSON output to attachable transports.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<style>
.github-corner {
Expand Down
20 changes: 10 additions & 10 deletions docs/tsdoc/classes/logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,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/56788ec/src/index.ts#L64">index.ts:64</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L64">index.ts:64</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -150,7 +150,7 @@ <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> settings</h3>
<div class="tsd-signature tsd-kind-icon">settings<span class="tsd-signature-symbol">:</span> <a href="../interfaces/isettings.html" class="tsd-signature-type">ISettings</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/index.ts#L64">index.ts:64</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L64">index.ts:64</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -172,7 +172,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/56788ec/src/index.ts#L117">index.ts:117</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L117">index.ts:117</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -209,7 +209,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/56788ec/src/index.ts#L147">index.ts:147</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L147">index.ts:147</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -240,7 +240,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/56788ec/src/index.ts#L171">index.ts:171</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L171">index.ts:171</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -271,7 +271,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/56788ec/src/index.ts#L179">index.ts:179</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L179">index.ts:179</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -302,7 +302,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/56788ec/src/index.ts#L155">index.ts:155</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L155">index.ts:155</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -333,7 +333,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/56788ec/src/index.ts#L131">index.ts:131</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L131">index.ts:131</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -364,7 +364,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/56788ec/src/index.ts#L139">index.ts:139</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L139">index.ts:139</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -395,7 +395,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/56788ec/src/index.ts#L163">index.ts:163</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/index.ts#L163">index.ts:163</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
8 changes: 4 additions & 4 deletions docs/tsdoc/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,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/56788ec/src/interfaces.ts#L33">interfaces.ts:33</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L33">interfaces.ts:33</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -125,7 +125,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/56788ec/src/interfaces.ts#L21">interfaces.ts:21</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L21">interfaces.ts:21</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -140,7 +140,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/56788ec/src/interfaces.ts#L27">interfaces.ts:27</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L27">interfaces.ts:27</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -155,7 +155,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/56788ec/src/interfaces.ts#L185">interfaces.ts:185</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L185">interfaces.ts:185</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
1 change: 1 addition & 0 deletions docs/tsdoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ <h3>All Features</h3>
<li><strong>Named Logger:</strong> Logger can be named (e.g. useful for packages/modules and monorepos)</li>
<li><strong>Highly configurable:</strong> All settings can be changed through a typed object</li>
<li><strong>Short paths:</strong> Paths are relative to the root of the application folder</li>
<li><strong>Runtime-agnostic:</strong> Works with <code>ts-node</code>, <code>ts-node-dev</code>, as well as compiled down to JavaScript</li>
<li><strong>Optionally overwrite <code>console</code>:</strong> Catch <code>console.log</code> etc. that would otherwise be hard to find</li>
<li><strong>Tested:</strong> 100% code coverage, CI</li>
</ul>
Expand Down
12 changes: 6 additions & 6 deletions docs/tsdoc/interfaces/icodeframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3>column<wbr>Number</h3>
<div class="tsd-signature tsd-kind-icon">column<wbr>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L221">interfaces.ts:221</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L221">interfaces.ts:221</a></li>
</ul>
</aside>
</section>
Expand All @@ -113,7 +113,7 @@ <h3>first<wbr>Line<wbr>Number</h3>
<div class="tsd-signature tsd-kind-icon">first<wbr>Line<wbr>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L219">interfaces.ts:219</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L219">interfaces.ts:219</a></li>
</ul>
</aside>
</section>
Expand All @@ -123,7 +123,7 @@ <h3>line<wbr>Number</h3>
<div class="tsd-signature tsd-kind-icon">line<wbr>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L220">interfaces.ts:220</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L220">interfaces.ts:220</a></li>
</ul>
</aside>
</section>
Expand All @@ -133,7 +133,7 @@ <h3>lines<wbr>After</h3>
<div class="tsd-signature tsd-kind-icon">lines<wbr>After<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</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/56788ec/src/interfaces.ts#L224">interfaces.ts:224</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L224">interfaces.ts:224</a></li>
</ul>
</aside>
</section>
Expand All @@ -143,7 +143,7 @@ <h3>lines<wbr>Before</h3>
<div class="tsd-signature tsd-kind-icon">lines<wbr>Before<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</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/56788ec/src/interfaces.ts#L222">interfaces.ts:222</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L222">interfaces.ts:222</a></li>
</ul>
</aside>
</section>
Expand All @@ -153,7 +153,7 @@ <h3>relevant<wbr>Line</h3>
<div class="tsd-signature tsd-kind-icon">relevant<wbr>Line<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L223">interfaces.ts:223</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L223">interfaces.ts:223</a></li>
</ul>
</aside>
</section>
Expand Down
10 changes: 5 additions & 5 deletions docs/tsdoc/interfaces/ierrorobject.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> code<wbr>Frame</h3>
<div class="tsd-signature tsd-kind-icon">code<wbr>Frame<span class="tsd-signature-symbol">:</span> <a href="icodeframe.html" class="tsd-signature-type">ICodeFrame</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L178">interfaces.ts:178</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L178">interfaces.ts:178</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -117,7 +117,7 @@ <h3>is<wbr>Error</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>Error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L170">interfaces.ts:170</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L170">interfaces.ts:170</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -132,7 +132,7 @@ <h3>message</h3>
<div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L174">interfaces.ts:174</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L174">interfaces.ts:174</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -147,7 +147,7 @@ <h3>name</h3>
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L172">interfaces.ts:172</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L172">interfaces.ts:172</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -162,7 +162,7 @@ <h3>stack</h3>
<div class="tsd-signature tsd-kind-icon">stack<span class="tsd-signature-symbol">:</span> <a href="istackframe.html" class="tsd-signature-type">IStackFrame</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/56788ec/src/interfaces.ts#L176">interfaces.ts:176</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L176">interfaces.ts:176</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
10 changes: 5 additions & 5 deletions docs/tsdoc/interfaces/ijsonhighlightcolors.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3>boolean</h3>
<div class="tsd-signature tsd-kind-icon">boolean<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L202">interfaces.ts:202</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L202">interfaces.ts:202</a></li>
</ul>
</aside>
</section>
Expand All @@ -112,7 +112,7 @@ <h3>key</h3>
<div class="tsd-signature tsd-kind-icon">key<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L200">interfaces.ts:200</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L200">interfaces.ts:200</a></li>
</ul>
</aside>
</section>
Expand All @@ -122,7 +122,7 @@ <h3>null</h3>
<div class="tsd-signature tsd-kind-icon">null<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L203">interfaces.ts:203</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L203">interfaces.ts:203</a></li>
</ul>
</aside>
</section>
Expand All @@ -132,7 +132,7 @@ <h3>number</h3>
<div class="tsd-signature tsd-kind-icon">number<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L199">interfaces.ts:199</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L199">interfaces.ts:199</a></li>
</ul>
</aside>
</section>
Expand All @@ -142,7 +142,7 @@ <h3>string</h3>
<div class="tsd-signature tsd-kind-icon">string<span class="tsd-signature-symbol">:</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/56788ec/src/interfaces.ts#L201">interfaces.ts:201</a></li>
<li>Defined in <a href="https://github.com/fullstack-build/tslog/blob/1123b3f/src/interfaces.ts#L201">interfaces.ts:201</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit e25eaa6

Please sign in to comment.