623 Commits

Author SHA1 Message Date
peteriman
c0f95fa53a
chore(test): update teardown() for tests to remove tmp files 2022-01-19 01:37:22 +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
peteriman
a96195a556
chore(deps-dev): bump nyc from 14.1.1 to 15.1.0 2022-01-16 00:43:06 +08:00
Lam Wei Li
67d20e4893
Merge pull request #1129 from log4js-node/update-deps
chore(deps-dev): bump eslint-config-prettier from 6.15.0 to 8.3.0
2022-01-14 22:01:50 +08:00
peteriman
b303b300ef
chore(deps-dev): bump eslint-config-prettier from 6.15.0 to 8.3.0 2022-01-14 21:54:11 +08:00
Lam Wei Li
c226cb7569
test: update fakeFS.read as graceful-fs uses it
`fs-extra@10.0.0` broke it as it removed the check for `fs.realpath.native`.

```diff
+L064 exports.realpath.native = u(fs.realpath.native)

-L126
-L127 // fs.realpath.native only available in Node v9.2+
-L128 if (typeof fs.realpath.native === 'function') {
-L129   exports.realpath.native = u(fs.realpath.native)
-L130 }
```
_(https://github.com/jprichardson/node-fs-extra/pull/887/files)_

When `fs.realpath` is an empty function, fs.realpath.native is `undefined`.

25c17ad980/test/tap/configuration-test.js (L17)
2022-01-14 21:13:13 +08:00
Lam Wei Li
7a3f2284e8
test: update fakeFS.read as graceful-fs uses it
graceful-fs broke it as it changed to use `Object.setPrototypeOf(read, fs$read`).

c55c1b8cb3 (diff-f740ecac46b2fdaa68156b133262813aa6f66218b11d8709bab83580e76e486dR136)

What this means is that, if `fakeFS.read` is `undefined`, it throws an error as `Object.setPrototypeOf` doesn't accept `undefined` in its parameters.
2022-01-14 02:49:17 +08:00
Lam Wei Li
968fc1c958
Merge pull request #1062 from abernh/fix-1042_logger-log--warn-on-invalid-log-level
fix(logger.log): warn on invalid log-level
2022-01-07 14:58:45 +08:00
peteriman
adbd3691af
Added automated testing for file descriptor leak 2022-01-04 15:54:44 +08:00
peteriman
60568bf3de
Added automated testing for file appender single SIGHUP listener 2021-12-28 16:15:11 +08:00
abernh
76f91427ba fix(logger.log): warn on invalid log-level
a warning is logged if the `log` method is used with an unknown log-level
this happens whenever people confuse the `log` method with yet another log-level-short method (like in the browser console.log)
adjusted `newLevel-test` accordingly

rel: https://github.com/log4js-node/log4js-node/issues/1042

Signed-off-by: abernh <a.bernhard@23go.de>
2021-02-23 12:02:15 +01:00
abetomo
b5f320e0fd test(improvement): Add tearDown to unit tests
This leaves the following Untracked files.
`test/tap/freeze-date-file-test`
2020-05-26 09:19:32 +09:00
Gareth Jones
4b0c6f41ad
Merge pull request #1002 from rnd-debug/donot-create-appender-if-not-used
Donot create appender if not used
2020-05-25 08:19:47 +10:00
rnd-debug
3cb7f52fce fix: will not try to create appender if it is not used in categories 2020-05-03 09:48:47 +02:00
Cocoa
b088498957
Fixed ESLint error about indentation
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 16:18:24 +08:00
Cocoa
b179740152
Fixed a copy-paste error and fixed warnings about exceeding the maximum line length
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 16:15:43 +08:00
Cocoa
0fda5c5094
Added test for removeColor option
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 16:11:23 +08:00
rnd-debug
ceae893896 feat: TCP appender - enabling a custom EndMsg token and a custom Layout 2020-04-12 19:34:06 +02:00
Mike Vastola
5aec282f06 fix: Allow appenders to depend on not-yet-loaded appenders.
Close #746
2020-02-01 16:57:20 -05:00
Gareth Jones
fa5b566884 chore: tidied up the language in pause test, fixed a date file mock 2019-11-19 08:35:28 +11:00
Gareth Jones
d7cf0ffe31 Merge branch 'master' of https://github.com/log4js-node/log4js-node 2019-11-19 08:27:33 +11:00
Gareth Jones
a859fe4ab0 chore: made language of pause and resume a bit clearer in test 2019-11-19 08:27:24 +11:00
Gareth Jones
dab0a06139
Merge pull request #965 from shayantabatabaee/master
fix: Add pause event to dateFile logger
2019-11-19 08:25:06 +11:00
shayan tabatabaee
3ff4d8b297 fix: Add pause event to dateFile logger 2019-11-15 11:56:19 +03:30
Gareth Jones
5c67e4aa94
Merge pull request #938 from shayantabatabaee/master
[enhancement]Emit pause event for node js when buffer is full
2019-11-15 08:28:49 +11:00
shayan tabatabaee
1a4201878e fix: Adding log4js namespace to pause event 2019-11-13 09:02:11 +03:30
Gareth Jones
2f45b084fb fix: truncation and padding for stacktraces 2019-10-22 08:58:46 +11:00
shayan tabatabaee
147f93797b Add test for pause event when the buffer is full, and unPause when drain event emitted 2019-09-10 20:06:07 +04:30
Gareth
3c31de3589 chore: updated streamroller dep, fixed test on windows 2019-08-23 08:11:26 +10:00
Gareth Jones
fb48f66d29 fix: test was failing in unix/mac 2019-08-16 16:24:56 +10:00
Gareth
5addabd6f6 chore: changes to get tests passing on windows 2019-08-16 14:26:39 +10:00
Gareth Jones
1ba8403bfe fix: handle cluster module not existing 2019-08-12 08:32:27 +10:00
Gareth Jones
70dc4176de chore: I give up. Stupid timezones 2019-08-09 11:35:57 +10:00
Gareth Jones
0b5132a5b1 chore: last timezone attempt 2019-08-09 11:00:57 +10:00
Gareth Jones
da5de8b566 chore: last attempt before I remove the failing test altogether 2019-08-09 10:53:22 +10:00
Gareth Jones
2f578a3de8 chore: I hate timezones 2019-08-07 10:09:30 +10:00
Gareth Jones
82b12e4bf1 chore: really fixed the timezone problem this time 2019-08-07 09:11:27 +10:00
Gareth Jones
335cbeedd7 chore: fixed timezone for test 2019-08-07 08:25:44 +10:00
Gareth Jones
ab32e753b2 chore: improved coverage in log4js.js 2019-08-02 10:51:21 +10:00
Gareth Jones
66fe30e9f4 chore: oh shit I changed the eslint rules 2019-08-01 16:57:32 +10:00
Gareth Jones
edf2535130 chore: improved layouts test coverage 2019-08-01 15:05:28 +10:00
Gareth Jones
3804caf904 chore: updated streamroller to v2, means we cannot support node v6 2019-08-01 10:58:09 +10:00
Gareth Jones
863ac65227 chore: made one of the tests simpler trying to diagnose a weird problem 2019-07-15 12:00:51 +10:00
Gareth Jones
f428d7d0fd
Merge pull request #913 from rommni/feature/fileNameTruncate
feat: add delimiter for fileName depth to %f layout patern
2019-07-10 08:18:21 +10:00