1678 Commits

Author SHA1 Message Date
Lam Wei Li
4deffd1975
Merge pull request #1163 from log4js-node/added-pattern-alias
refactor date pattern names for clarity (when %date actually means %datetime)
2022-01-23 21:25:45 +08:00
Lam Wei Li
26ed377d6c
fixed eslint 2022-01-23 21:20:34 +08:00
Lam Wei Li
bedbc4152f
refactor date pattern names for clarity (when %date actually means %datetime) 2022-01-23 21:20:26 +08:00
Lam Wei Li
58b73531b9
Merge pull request #1162 from nicojs/patch-1
fix(multiprocess): startup multiprocess even when no direct appenders
2022-01-23 19:34:19 +08:00
Nico Jansen
f127382fa8
fix(multiprocess): startup multiprocess even when no direct appenders attached
Fixes #1161
2022-01-23 00:20:19 +01:00
Gareth Jones
2ddc41d5a1
Merge pull request #1160 from log4js-node/gh-action-publish-typings
Add types check to publish workflow
2022-01-22 09:08:45 +11:00
Gareth Jones
528ce0f07f
Add types check to publish workflow
To avoid accidentally publishing broken typescript definitions to NPM in future.
2022-01-22 09:04:57 +11:00
Gareth Jones
cfdb895219
Merge pull request #1158 from glasser/fix-typings
Make typings match code better
2022-01-22 09:02:08 +11:00
Gareth Jones
e71123909a
Merge pull request #1159 from log4js-node/gh-action-typings
Add step to run typescript tests
2022-01-22 08:55:52 +11:00
Gareth Jones
c3966b5b16
Add step to run typescript tests
This adds the `typings` step to the build, so that we will know if a typescript change breaks things.
2022-01-22 08:52:20 +11:00
David Glasser
58234af1f6 Make typings match code better
Fixes v6.4.0 regressions.

There is an npm script `npm run typings` which actually failed before
this commit. This seems to have been a combination of incorrect typings
(a mandatory argument to `getLevel` that should be optional, the idea
that for custom appenders `configure` should return an intermediate
"generator" function before the appender function itself) as well as
mistakes in the test file (which had an appender module which had one
level of function nesting too few).

Specifically, for the `configure` function on appenders, I believe there
should be two levels of function: an outer function taking one-time
configuration, and an inner function taking an individual log messages.
The typings file wanted there to be three layers, and the test file
wanted there to be one layer.

Fixes #1155.
2022-01-21 10:50:55 -08:00
Lam Wei Li
9c9c79b8e7
Merge pull request #1153 from log4js-node/update-docs
chore(docs): changed author to contributors in package.json
2022-01-20 14:11:08 +08:00
Lam Wei Li
d4fe5276a7
chore(docs): changed author to contributors in package.json 2022-01-20 13:37:50 +08:00
github-actions
9fdbed5ad4 6.4.0 v6.4.0 2022-01-19 17:59:53 +00:00
Lam Wei Li
788c7a83bb
Merge pull request #1150 from log4js-node/update-changelog
chore: updated changelog for 6.4.0
2022-01-20 01:57:21 +08:00
Lam Wei Li
7fdb141135
chore: updated changelog for 6.4.0 2022-01-20 01:53:03 +08:00
Lam Wei Li
e6bd888c2d
Merge pull request #1151 from log4js-node/feat-zero-backup
allow for zero backup - https://github.com/log4js-node/streamroller/pull/74
2022-01-20 01:52:10 +08:00
Lam Wei Li
ac599e42c6
allow for zero backup - in sync with https://github.com/log4js-node/streamroller/pull/74
**Important**
It is also to note the file does not roll within itself (truncate its older entry for newer entry).
It truncates all and appends only the new entry.

```javascript
var rollers = require('streamroller');
var stream = new rollers.RollingFileStream('myfile', 6, 0);
stream.write("abc"); // add as first row
stream.write("def"); // add as second row
stream.write("ghi"); // truncate all and add as first row
stream.end();
```

Output:
```
myfile   - ghi
```
2022-01-20 01:47:15 +08:00
Lam Wei Li
53248cd564
Merge pull request #1149 from log4js-node/migrate-daysToKeep-to-numBackups
chore(deps): migrated from daysToKeep to numBackups due to streamroller@^3.0.0
2022-01-19 23:33:19 +08:00
Lam Wei Li
436d9b4951
Merge pull request #1148 from log4js-node/update-docs
chore(docs): updated fileSync.md and misc comments
2022-01-19 23:32:56 +08:00
Lam Wei Li
d6b017e720
chore(docs): updated fileSync.md and misc comments 2022-01-19 23:30:10 +08:00
Lam Wei Li
d4617a730d
chore(deps): migrated from daysToKeep to numBackups due to streamroller@^3.0.0 2022-01-19 23:24:14 +08:00
Lam Wei Li
0ad0133823
Merge pull request #1147 from log4js-node/update-deps
chore(deps): bump streamroller from 3.0.1 to 3.0.2
2022-01-19 22:33:19 +08:00
Lam Wei Li
773962be96
Merge pull request #1146 from log4js-node/update-deps
chore(deps): bump date-format from 4.0.2 to 4.0.3
2022-01-19 22:26:18 +08:00
Lam Wei Li
823bb46120
Merge pull request #1145 from log4js-node/update-deps
chore(deps-dev): bump eslint from from 8.6.0 to 8.7.0
2022-01-19 22:20:36 +08:00
Lam Wei Li
6cc0035fcc
chore(deps): bump streamroller from 3.0.1 to 3.0.2 2022-01-19 22:14:04 +08:00
Lam Wei Li
0f39859776
chore(deps): bump date-format from 4.0.2 to 4.0.3 2022-01-19 22:12:36 +08:00
Lam Wei Li
85ac31ecbc
chore(deps-dev): bump eslint from from 8.6.0 to 8.7.0 2022-01-19 22:08:14 +08:00
Lam Wei Li
acd41ef069
Merge pull request #1144 from log4js-node/refactor
chore(refactor): using writer.writable instead of alive for checking
2022-01-19 21:59:50 +08:00
Lam Wei Li
4c4bbe84e8
chore(refactor): using writer.writable instead of alive for checking 2022-01-19 21:55:06 +08:00
Lam Wei Li
e86a809544
Merge pull request #1097 from 4eb0da/datefile-error-handling
dateFile error handling fix
2022-01-19 21:26:03 +08:00
Lam Wei Li
34ab3b261c
Merge pull request #1143 from log4js-node/update-test
chore(test): update teardown() for tests to remove tmp files
2022-01-19 10:36:52 +08:00
Lam Wei Li
8cba85f91d
chore(test): renamed tap.teardown() to tap.tearDown() for consistency (while both works, only tap.tearDown() is documented) 2022-01-19 10:32:21 +08:00
Lam Wei Li
a0baec23a8
chore(test): fixed teardown() causing tests to fail due to fs errors on removal 2022-01-19 10:32:20 +08:00
Lam Wei Li
51ac865bef
Merge pull request #1103 from polo-language/recording-typescript
Expose recording in typescript
2022-01-19 02:04:45 +08:00
Lam Wei Li
653a20f1f1
Merge pull request #1028 from techmunk/master
Fix TCP appender with Webpack and Typescript
2022-01-19 02:02:43 +08:00
Lam Wei Li
43a2199137
chore(test): Changed default TAP test suite timeout from 30s to 45s because Windows takes a long time 2022-01-19 01:57:25 +08:00
Lam Wei Li
c13915587d
Merge pull request #1079 from nicobao/improve-typedefs
feat(typing): improving @types for AppenderModule
2022-01-19 01:52:37 +08:00
Lam Wei Li
8b97993c81
Merge branch 'master' into update-test 2022-01-19 01:50:57 +08:00
Lam Wei Li
c45bfeb4fc
Merge pull request #1022 from abetomo/feature/improve_unit_testing_teardown
test(improvement): Add tearDown to unit tests
2022-01-19 01:38:49 +08:00
peteriman
c0f95fa53a
chore(test): update teardown() for tests to remove tmp files 2022-01-19 01:37:22 +08:00
Lam Wei Li
3caa706ee2
chore(test): Changed default TAP test suite timeout from 30s to 45s because Windows takes a long time 2022-01-19 00:31:39 +08:00
Lam Wei Li
05935cc9c6
Merge pull request #1142 from log4js-node/update-test
test: added assertion for increase of SIGHUP listeners on log4js.configure()
2022-01-18 02:36:59 +08:00
peteriman
65e3eb8b52
chore: changes to get tests running on windows 2022-01-18 02:14:19 +08:00
Lam Wei Li
2a434f6861
Merge pull request #1113 from peteriman/Fixes-FileDescriptorLeak
Fixes file descriptor leak in certain use cases
2022-01-18 01:37:53 +08:00
peteriman
96f198b920
Reduced setTimeout(1000) -> setTimeout(250) for waiting for file system to catch up 2022-01-18 01:13:28 +08:00
peteriman
c12ac23e07
Fixed ESLint arrow-body-style error 2022-01-17 11:00:20 +08:00
peteriman
23330546a9
Added automated test to assert appenders and categories are reverted back to initial state on log4js.shutdown() 2022-01-17 10:06:35 +08:00
peteriman
eb3143d134
Added 1 more assertion for increase of SIGHUP listeners on log4js.configure() 2022-01-17 09:24:53 +08:00
Lam Wei Li
0aed197dd3
Merge pull request #1141 from log4js-node/improve-security
Changed default file modes from 0o644 to 0o600 for better security
2022-01-16 22:13:59 +08:00