Lam Wei Li
243592baf9
fix: tilde expansion
2023-02-20 02:03:10 +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
4bc5589a28
style: ran prettier
2022-07-26 03:07:06 +08:00
Zachary Haber
cad9555948
style: run prettier:fix
2022-06-23 01:00:07 +08:00
Lam Wei Li
a0eceefed1
feat: tilde expansion for filename
2022-05-22 16:40:06 +08:00
Lam Wei Li
d182204079
fix: filename validation (cannot be directory)
2022-05-22 16:23:48 +08:00
Lam Wei Li
4f1111ee40
chore(lint): added specific eslint rule(s) to disable for clarity
2022-03-12 01:25:39 +08:00
Lam Wei Li
e3a36db232
chore(validation): added filename validation for fileAppender and filesyncAppender
2022-03-06 21:35:11 +08:00
Lam Wei Li
4bc77b68a9
chore(refactor): fileAppender to have same internal code ordering as fileSyncAppender
2022-03-06 21:22:55 +08:00
Lam Wei Li
eb9c923b04
Misc formatting
2022-02-02 03:06:22 +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
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
peteriman
8042252861
Changed default file modes from 0o644 to 0o600 for better security
2022-01-16 22:09:32 +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
Aleksandr Nefedov
a3e6363cd9
dateFile error handling fix 2
2021-10-04 18:05:19 +03: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
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
Gareth Jones
a859fe4ab0
chore: made language of pause and resume a bit clearer in test
2019-11-19 08:27:24 +11:00
shayan tabatabaee
1a4201878e
fix: Adding log4js namespace to pause event
2019-11-13 09:02:11 +03:30
shayan tabatabaee
58bc2ed017
[enhancement]Emmit pause event for node js when buffer is full
2019-09-09 00:20:55 +04:30
Gareth
3c31de3589
chore: updated streamroller dep, fixed test on windows
2019-08-23 08:11:26 +10:00
Gareth Jones
66fe30e9f4
chore: oh shit I changed the eslint rules
2019-08-01 16:57:32 +10:00
Gareth Jones
542daa48c1
fix: sighup handler was just nonsense
2019-05-09 08:15:33 +10:00
Gareth Jones
2c94c6ec73
fix : #700
2018-04-30 08:13:51 +10:00
Rami Cohen
0e13be9f91
chore: upgraded dev deps
2017-11-12 19:14:23 -07:00
Gareth Jones
2e035286d1
fix(exit): made exit listeners responsibility of caller
2017-03-20 09:04:36 +11:00
Gareth Jones
833c5a0881
chore(merge): merged in changes from master
2017-03-20 08:21:45 +11:00
hansonw
303f10a70d
fix(fileAppender): Fix up shutdown functions
2017-03-15 00:41:44 -07:00
Gareth Jones
1d50b82a96
refactor: fixed a few more appenders
2017-02-07 08:53:51 +11:00
e-cloud
7d9dc55ff2
style: upgrade eslint and format the code
...
no logic changed.
2016-12-12 21:04:34 +08:00
e-cloud
02d6c017f4
Merge branch 'master'
...
Conflicts:
.travis.yml
lib/appenders/dateFile.js
lib/appenders/file.js
lib/appenders/fileSync.js
lib/appenders/gelf.js
lib/appenders/logFacesAppender.js
lib/date_format.js
lib/debug.js
lib/layouts.js
lib/log4js.js
lib/log4js.json
lib/logger.js
lib/streams/BaseRollingFileStream.js
lib/streams/DateRollingFileStream.js
lib/streams/RollingFileStream.js
lib/streams/index.js
package.json
test/layouts-test.js
test/streams/BaseRollingFileStream-test.js
test/streams/DateRollingFileStream-test.js
test/streams/rollingFileStream-test.js
2016-12-12 17:42:34 +08:00
Gareth Jones
3f93872ecc
fixed lint problem
2016-11-06 15:49:06 +11:00
Gareth Jones
eac6295e4c
fix for #418 - date formats broken in file appenders
2016-11-06 15:47:45 +11:00
Gareth Jones
281386a30c
added test for SIGHUP handler
2016-11-02 08:46:34 +11:00
Gareth Jones
7f078161e4
fixed to use streamroller
2016-11-02 08:08:28 +11:00
Gareth Jones
81451e416a
Merge branch 'logrotate' of https://github.com/jsha/log4js-node into jsha-logrotate
2016-10-24 08:49:37 +11:00
Gareth Jones
2b84671471
changed default appender to stdout, replaced streams with streamroller, started removal of vows tests
2016-10-23 11:50:53 +11:00
Jacob Hoffman-Andrews
0b07c1cb7f
Merge branch 'master' into logrotate
2016-08-28 15:01:11 -04:00
Jacob Hoffman-Andrews
b7cf2f1e92
Add close-on-SIGHUP behavior for logrotate.
2016-08-28 14:40:47 -04:00
e-cloud
9cc3a88bd7
refactor: more small refactor
...
1. drop semver related code with no need to detect node version
2. drop license declaration in log4js.js for there is one in the project dir
3. other changes
2016-07-16 13:49:24 +08:00
e-cloud
505e5dbde9
refactor: appenders/file.js
2016-07-15 20:05:10 +08:00
e-cloud
5328e03802
refactor: just format code according to the editor config(tests passed)
2016-07-14 17:36:30 +08:00
Gareth Jones
97fc892c00
fixing some jshint errors
2016-04-29 09:11:17 +10:00