20 Commits

Author SHA1 Message Date
Lam Wei Li
243592baf9
fix: tilde expansion 2023-02-20 02:03:10 +08:00
Lam Wei Li
adcc06fb88
test: refactor fs.mkdirSync(..., { recursive: true }) for Node.js <10.12.0 2022-07-25 00:24:59 +08:00
Zachary Haber
cad9555948
style: run prettier:fix 2022-06-23 01:00:07 +08:00
Lam Wei Li
d182204079
fix: filename validation (cannot be directory) 2022-05-22 16:23:48 +08:00
Lam Wei Li
aa566df3f8
chore(test): improve test coverage for fileSyncAppender
appenders/fileSync.js - Line 11 - return;
2022-03-08 23:26:19 +08:00
Lam Wei Li
8ad41831d1
chore(test): improve test coverage for fileSyncAppender
appenders/fileSync.js - Line 58 - throw new Error(`maxLogSize (${maxLogSize}) should be > 0`);
2022-03-08 17:22:12 +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
e99d5857cb
Added test cases 2022-03-02 19:42:42 +08:00
Lam Wei Li
d3872208c9
refactor(test): tap v15 - replaced deprecated synonyms, separated tap.has() and tap.match()
https://github.com/tapjs/node-tap/pull/649/files
6d9f5798a9/lib/synonyms.js
2c15bd8779
2022-01-26 20:15:15 +08:00
Lam Wei Li
166f2252f7
refactor(test): replaced tap.tearDown() (deprecated) to tap.teardown() (backward-compatible) in preparation for tap v15
https://github.com/tapjs/node-tap/pull/649/files
2022-01-26 19:14:56 +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
peteriman
c0f95fa53a
chore(test): update teardown() for tests to remove tmp files 2022-01-19 01:37:22 +08:00
Gareth
5addabd6f6 chore: changes to get tests passing on windows 2019-08-16 14:26:39 +10:00
Gareth Jones
66fe30e9f4 chore: oh shit I changed the eslint rules 2019-08-01 16:57:32 +10:00
Martin Heidegger
a06e2cc83c chore: updated dependencies (including eslint) 2019-02-20 23:07:23 +09:00
liuwenzhe
e4126b4d67 feat: Enable maxLogSize with unit 2018-05-04 11:53:09 +08:00
Gareth Jones
8627f743ef fix(#614): bumped deps of debug, date-format, streamroller 2017-11-17 08:47:45 +11:00
Rami Cohen
dc2079e4c1 fix(fileSync): options not used 2017-11-12 11:30:06 -07:00
Gareth Jones
1d50b82a96 refactor: fixed a few more appenders 2017-02-07 08:53:51 +11:00
Gareth Jones
2d7cee2de5 fix(test): moved fileSync test to tap 2016-12-30 20:27:16 +11:00