|
1 | 1 | # Change Log - tslog |
2 | 2 |
|
3 | | -## 2.6.0: |
| 3 | +## 2.6.0: |
| 4 | + |
4 | 5 | Mon, 29 Jun 2020 |
5 | 6 |
|
6 | | -* Add new type: `hidden` |
| 7 | +- Add new type: `hidden` |
| 8 | + |
| 9 | +## 2.5.0: |
7 | 10 |
|
8 | | -## 2.5.0: |
9 | 11 | Sat, 20 Jun 2020 |
10 | | -*This is a jam-packed release 🎉* |
| 12 | +_This is a jam-packed release 🎉_ |
11 | 13 |
|
12 | 14 | _Don't underestimate this minor version jump, it's only due to semver and its backward compatibility reasons. ;-)._ |
13 | 15 |
|
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: |
20 | 24 |
|
21 | | -## 2.2.0: |
22 | 25 | 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 | + |
35 | 40 | 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 |
37 | 43 | - Adjust default error colors |
38 | 44 |
|
39 | | -## 2.0.0: |
| 45 | +## 2.0.0: |
| 46 | + |
40 | 47 | Sun, 24 Mai 2020 |
| 48 | + |
41 | 49 | - Setting `logAsJson` replaced with `type` = `pretty` | `json` ('pretty' is default) |
42 | 50 | - `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` |
44 | 52 | - Error object displays additional `details` and exposes `nativeError` |
45 | 53 | - When `type` is set to `json`, hide `nativeError` and expose stringified version as `errorString` |
46 | 54 |
|
47 | 55 | ## 1.0.0 |
48 | | -Thu, 30 Apr 2020 |
49 | 56 |
|
50 | | -*Initial release* |
| 57 | +Thu, 30 Apr 2020 |
51 | 58 |
|
| 59 | +_Initial release_ |
0 commit comments