Skip to content

Commit 475d8a5

Browse files
authored
Merge pull request #118 from fullstack-build/development
Development
2 parents ecb89c7 + 775855e commit 475d8a5

35 files changed

+25810
-10818
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: 'Bug: [BUG]'
4+
title: "Bug: [BUG]"
55
labels: bug
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Describe feature or change proposals for the library
4-
title: 'Feature Request: [Feature]'
4+
title: "Feature Request: [Feature]"
55
labels: enhancement
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
**Description / Use Case for a Feature**

.travis.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
language: node_js
2-
node_js:
3-
- "14"
4-
- "12"
5-
- "10"
6-
7-
install:
8-
- npm install
9-
- npm run build
10-
11-
script:
12-
- npm run coveralls
1+
language: node_js
2+
node_js:
3+
- "14"
4+
- "12"
5+
- "10"
6+
7+
install:
8+
- npm install
9+
- npm run build
10+
11+
script:
12+
- npm run coveralls

CHANGELOG.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,59 @@
11
# Change Log - tslog
22

3-
## 2.6.0:
3+
## 2.6.0:
4+
45
Mon, 29 Jun 2020
56

6-
* Add new type: `hidden`
7+
- Add new type: `hidden`
8+
9+
## 2.5.0:
710

8-
## 2.5.0:
911
Sat, 20 Jun 2020
10-
*This is a jam-packed release 🎉*
12+
_This is a jam-packed release 🎉_
1113

1214
_Don't underestimate this minor version jump, it's only due to semver and its backward compatibility reasons. ;-)._
1315

14-
* **Child Loggers:** Use `getChildLogger` to create a child logger based on the current instance, inherit all its settings including prefixes, and overwrite the ones you would like to change in this child. Makes it possible to follow a request all the way down (s. below `requestId`)
15-
* **Runtime settings changes:** Use `setSettings()` to change settings during runtime. Changes will also propagate to every potential child logger but can also be overwritten along the way. Prefixes will be enhanced instead of overwritten.
16-
* **requestId:** Use `async_hooks` (e.g. `AsyncLocalStorage`) to follow a request all the way down the promise chain (Example: Display all logs from Server down to DB)
17-
* **Mask secrets:** Use `maskValuesOfKeys` & `maskStrings` to prevent _tslog_ from printing secrets and sensitive information like passwords, secrets, api keys and Authorization Bearer
18-
* **Prefix:** `prefix` Prefix every log message with additional attributes that are also inherited to child loggers
19-
* **Types:** `displayTypes: true` Display types for all variables passed to _tslog_, eg. `string: test number: 123`
16+
- **Child Loggers:** Use `getChildLogger` to create a child logger based on the current instance, inherit all its settings including prefixes, and overwrite the ones you would like to change in this child. Makes it possible to follow a request all the way down (s. below `requestId`)
17+
- **Runtime settings changes:** Use `setSettings()` to change settings during runtime. Changes will also propagate to every potential child logger but can also be overwritten along the way. Prefixes will be enhanced instead of overwritten.
18+
- **requestId:** Use `async_hooks` (e.g. `AsyncLocalStorage`) to follow a request all the way down the promise chain (Example: Display all logs from Server down to DB)
19+
- **Mask secrets:** Use `maskValuesOfKeys` & `maskStrings` to prevent _tslog_ from printing secrets and sensitive information like passwords, secrets, api keys and Authorization Bearer
20+
- **Prefix:** `prefix` Prefix every log message with additional attributes that are also inherited to child loggers
21+
- **Types:** `displayTypes: true` Display types for all variables passed to _tslog_, eg. `string: test number: 123`
22+
23+
## 2.2.0:
2024

21-
## 2.2.0:
2225
Fri, 05 Jun 2020
23-
Added additional output settings:
24-
* dateTimePattern: DateTime pattern based on Intl.DateTimeFormat.formatToParts with additional milliseconds, default: `year-month-day hour:minute:second.millisecond`
25-
* dateTimeTimezone: DateTime timezone, e.g. `utc`, or `Europe/Berlin`, `Europe/Moscow`. You can use `Intl.DateTimeFormat().resolvedOptions().timeZone` for local timezone, default: "utc"
26-
* printLogMessageInNewLine: Print log message in a new line below meta information, default: `false`
27-
* displayDateTime: Display date time at the beginning of a log message, default: `true`
28-
* displayLogLevel: Display log level, default: `true`
29-
* displayInstanceName: Display instanceName or not, default: `false`
30-
* displayLoggerName: Display name of the logger. Will only be visible if `name` was set, default: `true`
31-
* displayFilePath: Display file path ("hidden" | "displayAll" | "hideNodeModulesOnly"), default "hideNodeModulesOnly"
32-
* displayFunctionName: Display function name, default: `true`
33-
34-
## 2.1.0:
26+
Added additional output settings:
27+
28+
- dateTimePattern: DateTime pattern based on Intl.DateTimeFormat.formatToParts with additional milliseconds, default: `year-month-day hour:minute:second.millisecond`
29+
- dateTimeTimezone: DateTime timezone, e.g. `utc`, or `Europe/Berlin`, `Europe/Moscow`. You can use `Intl.DateTimeFormat().resolvedOptions().timeZone` for local timezone, default: "utc"
30+
- printLogMessageInNewLine: Print log message in a new line below meta information, default: `false`
31+
- displayDateTime: Display date time at the beginning of a log message, default: `true`
32+
- displayLogLevel: Display log level, default: `true`
33+
- displayInstanceName: Display instanceName or not, default: `false`
34+
- displayLoggerName: Display name of the logger. Will only be visible if `name` was set, default: `true`
35+
- displayFilePath: Display file path ("hidden" | "displayAll" | "hideNodeModulesOnly"), default "hideNodeModulesOnly"
36+
- displayFunctionName: Display function name, default: `true`
37+
38+
## 2.1.0:
39+
3540
Sun, 26 Mai 2020
36-
- Exposed helper method `prettyError` that helps pretty-printing an error without logging with various options
41+
42+
- Exposed helper method `prettyError` that helps pretty-printing an error without logging with various options
3743
- Adjust default error colors
3844

39-
## 2.0.0:
45+
## 2.0.0:
46+
4047
Sun, 24 Mai 2020
48+
4149
- Setting `logAsJson` replaced with `type` = `pretty``json` ('pretty' is default)
4250
- `chalk` dependency removed (hexadecimal colors are no longer supported)
43-
- Color settings based on Node.js `utils.inspect.colors`
51+
- Color settings based on Node.js `utils.inspect.colors`
4452
- Error object displays additional `details` and exposes `nativeError`
4553
- When `type` is set to `json`, hide `nativeError` and expose stringified version as `errorString`
4654

4755
## 1.0.0
48-
Thu, 30 Apr 2020
4956

50-
*Initial release*
57+
Thu, 30 Apr 2020
5158

59+
_Initial release_

0 commit comments

Comments
 (0)