2219 Commits

Author SHA1 Message Date
Lam Wei Li
d2ef2628a7
refactor(log4js): no need for .reduceRight(), use .reduce() instead 2022-10-02 02:54:58 +08:00
Lam Wei Li
a10f4a2941
feat(log4js): if cb is passed to shutdown(), it must be a function or it will throw error immediately 2022-10-02 02:54:57 +08:00
Lam Wei Li
cfbc7a08a6
Merge pull request #1333 from log4js-node/refactor/LoggingEvent
refactor(LoggingEvent): loop through location keys instead of hard-coding one-by-one
2022-10-02 01:20:06 +08:00
Lam Wei Li
6a8b706590
test(Logger): apart from asserting a throw, also assert the thrown error message 2022-10-02 01:15:06 +08:00
Lam Wei Li
6f697ad317
fix(LoggingEvent): throws error for invalid location passed when creating a new LoggingEvent 2022-10-02 01:15:05 +08:00
Lam Wei Li
31ae2b258d
refactor(LoggingEvent): loop through location keys instead of hard-coding one-by-one 2022-10-02 00:54:50 +08:00
Lam Wei Li
570ef530dc
Merge pull request #1332 from log4js-node/fix/serde
fix(LoggingEvent): serde for `NaN`, `Infinity`, `-Infinity`, `undefined`
2022-10-01 18:57:05 +08:00
Lam Wei Li
ffa9e5e2e4
refactor: typeof to check for undefined (because undefined can be a variable name) 2022-10-01 18:38:14 +08:00
Lam Wei Li
8b44497193
test(logLevelFilter): renamed test description with correct filenames 2022-10-01 18:38:13 +08:00
Lam Wei Li
6f9c436896
fix(LoggingEvent): serde for NaN, Infinity, -Infinity, undefined 2022-10-01 18:37:41 +08:00
Lam Wei Li
916eef11f1
Merge pull request #1269 from ZachHaber/master
Add ability to use passed in Errors for callstacks and adjust how deeply you want to look for information
2022-09-30 01:00:13 +08:00
Zachary Haber
0089e784b4
refactor: remove duck typing 2022-09-30 00:55:23 +08:00
Zachary Haber
b1598c04c7
feat: add error to logging event from logger 2022-09-30 00:55:20 +08:00
Zachary Haber
0683535e0f
feat: add error property to LoggingEvent 2022-09-30 00:27:49 +08:00
Zachary Haber
4ffbcae8b2
chore: update docs 2022-09-29 23:35:57 +08:00
Zachary Haber
0465894412
chore: tests for new parseCallStack functionality and changes 2022-09-29 23:27:50 +08:00
Zachary Haber
b139aafcab
feat: setParseCallStackFunction(undefined) will restore the default behavior 2022-09-29 23:27:49 +08:00
Zachary Haber
d53495a8ab
fix: setParseCallStackFunction will no longer allow invalid values
if set to an invalid value, it'll throw an error immediately, instead of later.
2022-09-29 23:27:49 +08:00
Zachary Haber
a17c8e5e6f
feat: allow setting how deeply a logger should search into the stack
`logger.callStackLinesToSkip = 2` will make it skip 2 extra lines above the base.

You can't skip negative lines

Refs: #1268
2022-09-29 23:27:48 +08:00
Zachary Haber
89b8a58f3f
feat: use data Error for callStack information
use the first data value if an Error to get callstack info. Only 1 line will be stripped from it by default

Refs: #1268
2022-09-29 23:27:47 +08:00
Zachary Haber
22c7d224de
chore: separate out CallStack type from base LoggingEvent 2022-09-29 23:27:47 +08:00
Lam Wei Li
3bc94fdd45
Merge pull request #1330 from log4js-node/update-deps
chore(deps): bump typescript from 4.8.3 to 4.8.4
2022-09-28 17:33:45 +08:00
Lam Wei Li
22a80cf193
chore(deps): bump typescript from 4.8.3 to 4.8.4 2022-09-28 17:32:18 +08:00
Lam Wei Li
1895d3132f
Merge pull request #1329 from log4js-node/update-deps
chore(deps-dev): updated dependencies
2022-09-28 17:28:23 +08:00
Lam Wei Li
b230e19710
chore(deps-dev): updated package-lock.json 2022-09-28 17:23:28 +08:00
Lam Wei Li
2523e17a15
chore(deps-dev): bump prettier from 1.19.1 to 2.7.1 2022-09-28 17:22:38 +08:00
Lam Wei Li
7ce7d42621
chore(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.2.1 2022-09-28 17:22:01 +08:00
Lam Wei Li
ea7aeb2537
chore(deps-dev): bump tap from 14.11.0 to 16.3.0 2022-09-28 17:20:42 +08:00
Lam Wei Li
995ef69a30
chore(deps-dev): bump nyc from 14.1.1 to 15.1.0 2022-09-28 17:20:13 +08:00
Lam Wei Li
ae75c368f6
Merge pull request #1328 from log4js-node/update-ci
ci: skip prettier on older Node.js (8.x, 10.x, 12.x)
2022-09-28 17:14:11 +08:00
Lam Wei Li
2591afb379
ci: skip prettier on older Node.js (8.x, 10.x, 12.x) 2022-09-28 17:05:21 +08:00
Lam Wei Li
c0e211f6f4
ci: manually downgrade dev dependencies for older versions 2022-09-28 17:05:18 +08:00
Lam Wei Li
f94c799dab
Merge pull request #1327 from log4js-node/update-deps
chore(deps): updated dependencies
2022-09-27 22:46:21 +08:00
Lam Wei Li
f4d050ce98
chore(deps): updated package-lock.json 2022-09-27 22:38:47 +08:00
Lam Wei Li
c84b19350d
chore(deps): bump streamroller from 3.1.2 to 3.1.3 2022-09-27 22:38:45 +08:00
Lam Wei Li
dec44f1b9d
chore(deps): bump flatted from 3.2.6 to 3.2.7 2022-09-27 22:38:44 +08:00
Lam Wei Li
1fb8b14864
chore(deps): bump date-format from 4.0.13 to 4.0.14 2022-09-27 22:38:43 +08:00
Lam Wei Li
4805867a68
chore(deps-dev): bump typescript from 4.7.4 to 4.8.3 2022-09-27 22:38:42 +08:00
Lam Wei Li
a60fe997c5
chore(deps-dev): bump fs-extra from 8.1.0 to 10.1.0 2022-09-27 22:38:41 +08:00
Lam Wei Li
a8f0df0336
chore(deps-dev): bump eslint-config-prettier from 6.15.0 to 8.5.0 2022-09-27 22:38:40 +08:00
Lam Wei Li
26066bda30
chore(deps-dev): bump eslint-config-airbnb-base from 14.2.1 to 15.0.0 2022-09-27 22:38:39 +08:00
Lam Wei Li
465f8ce6a8
chore(deps-dev): bump eslint from 6.8.0 to 8.24.0 2022-09-27 22:38:38 +08:00
Lam Wei Li
ffb8c64e86
chore(deps-dev): bump @commitlint/config-conventional from 17.0.3 to 17.1.0 2022-09-27 22:38:37 +08:00
Lam Wei Li
7d97e1e1e3
chore(deps-dev): bump @commitlint/cli from 17.0.3 to 17.1.2 2022-09-27 22:38:37 +08:00
Lam Wei Li
859b120423
Merge pull request #1326 from log4js-node/update-ci
ci: manually downgrade dev dependencies for older versions
2022-09-27 22:26:09 +08:00
Lam Wei Li
0f9482acd8
ci: manually downgrade dev dependencies for older versions 2022-09-27 22:18:03 +08:00
Lam Wei Li
447b949ebd
Merge pull request #1325 from log4js-node/update-ci
ci: removed scheduled job from codeql and separated npm audit
2022-09-26 13:59:10 +08:00
Lam Wei Li
aee424141b
ci: removed scheduled job from codeql and separated npm audit 2022-09-26 13:48:53 +08:00
Lam Wei Li
084479c351
Merge pull request #1322 from gkalpak/patch-2
docs(noLogFilter): fix heading (`Category Filter` --> `No-Log Filter`)
2022-09-07 17:18:56 +08:00
Lam Wei Li
46ddb075d8
Merge pull request #1321 from gkalpak/patch-1
docs(migration-guide): fix typo (`have been remove` --> `have been removed`)
2022-09-07 17:17:27 +08:00