648 Commits

Author SHA1 Message Date
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
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
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
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
8042252861
Changed default file modes from 0o644 to 0o600 for better security 2022-01-16 22:09:32 +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
Lam Wei Li
c9d67604c0
Merge pull request #1110 from peteriman/Fixes-#852-MaxListenersExceededWarning
Avoid creating multiple SIGHUP listeners for File Appender
2022-01-05 23:48:32 +08:00
Lam Wei Li
09b43b1d80
Merge pull request #1089 from jhonatanTeixeira/fix_tcp_error_newer_node
fix: on newer nodejs versions listening to socket errors are required
2022-01-05 23:18:22 +08:00
Lam Wei Li
0144f9a9d5
Merge pull request #529 from harlentan/patch-1
fix worker will die if the master exit
2022-01-05 23:17:47 +08:00
Lam Wei Li
3f1ac52866
Added trailing semi-colon 2022-01-05 20:28:32 +08:00
Lam Wei Li
4565359448
Flush the buffer on 'error' 2022-01-05 20:28:27 +08:00
peteriman
44bf7ce5bb
Improved code readability for shutdown() function 2022-01-04 15:58:47 +08:00
peteriman
1e066b9bfa
Patched file descriptor leak by:
- subsequent log4js.configure() will run log4js.shutdown() first
- log4js.shutdown() will always clear/reset existing appenders and categories
2022-01-04 15:56:36 +08:00
peteriman
ac72e99de3
Creates a 1 SIGHUP handler instead
I think the issue is that each file appender instance adds a SIGHUP handler, when they could all use the same handler. I'll see if I can work on a fix.

_Originally posted by @nomiddlename in https://github.com/log4js-node/log4js-node/issues/852#issuecomment-496316399_
2021-12-17 00:41:48 +08:00
Angelo Polo
5b320e3b2f fix: Expose recording in typescript types 2021-11-11 10:51:57 +01:00
Aleksandr Nefedov
a3e6363cd9 dateFile error handling fix 2 2021-10-04 18:05:19 +03:00
Aleksandr Nefedov
9433b12eac dateFile error handling fix 2021-10-04 14:55:48 +03:00
Jhonatan Teixeira
fa366c8abc fix: on newer nodejs versions listening to socket errors are required 2021-07-14 09:49:30 -03: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
Techmunk
0a027d1dff fix: tcp appender was missing from core appenders 2020-06-16 20:39:22 +10:00
Gareth Jones
5c5f54fcf7 fix: tcp-server needs to be loaded even if no categories 2020-05-25 08:55:04 +10:00
Gareth Jones
ff475b9d07
Merge pull request #1015 from lauren-li/fix-webpack-fileSync
fix: fileSync was missing from core appenders
2020-05-25 08:28:35 +10:00
Gareth Jones
fe0713ae08
Merge pull request #1004 from wataash/style-param
style: conform @param to official style
2020-05-25 08:22:59 +10: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
Lauren Li
5468dd7c41 fix: fileSync was missing from core appenders 2020-05-19 16:45:41 -04:00
Cocoa
52185a4984
Fixed ESLint no-else-return error
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-09 04:39:04 +08:00
Cocoa
8cfe1627c6
Only detects ANSI color codes for data in string type
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-09 04:20:49 +08:00
Cocoa
40b5f09fe8
Using regexp literal and .map instead of a loop for replacing
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-07 16:23:20 +08:00
Wataru Ashihara
a81500b7e6
style: conform @param to official style
ref. https://jsdoc.app/tags-param.html
2020-05-04 09:13:36 +09:00
rnd-debug
aabc15d491 style: style fix 2020-05-03 09:59:06 +02: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
0fda5c5094
Added test for removeColor option
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 16:11:23 +08:00
Cocoa
e26d35acfe
Using eslint-disable-next-line
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 15:54:33 +08:00
Cocoa
9a29125e72
Disable no-control-regex rule for the line containing \x1b in regex
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 15:53:07 +08:00
Cocoa
b18846c297
Fixed ESLint errors
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 15:18:40 +08:00
Cocoa
f25c8ed782
Added support for removing embeded color sequence for file appender
Signed-off-by: Cocoa <0xbbc@0xbbc.com>
2020-05-02 05:24:18 +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
aaropn-edwards
a1197982e2 fix: Adds guards for undefiend callback functions in shutdown method
This fixes issue #971
2019-11-21 10:14:17 +11: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
58bc2ed017 [enhancement]Emmit pause event for node js when buffer is full 2019-09-09 00:20:55 +04:30