Comments (7)
Hi @ankityadav1 ,
I can't say if the error depends on the problem I can see, but for sure your options are so strange:
maxSize: '5M',
size: '5M',
this means "please rotating-file-stream, rotate my log file every 5MB and do not allow more than 5MB for all the rotated files".
I suggest to remove (or increase the value of) maxSize
.
Please let me know if this cleaning action solves your problem, if yes you discovered a strange bug.
Thank you,
iCC
from rotating-file-stream.
Hi iCC,
Thanks for responding.
My requirement is to compress the rotated log files and the existing log files are mostly larger in size.
Hence the code says maxSize 5MB and for the new log files, I want rotating-file-stream to generate slog files of 5MB max.
And it works!!
It compresses the log files after rotation and its hardly few bytes after that.
Lastly I tried your suggestion and removed maxSize option but still facing the same issue.
Do you want me to paste any more of my code here?
It seems this is a bug.
from rotating-file-stream.
No thanks, no other code is required, @ankityadav1 . If possible could you please cut/paste the stack trace of the EPERM error?
BTW, are you sure you have full write access on LOG_PATH
?
Thank you
from rotating-file-stream.
Yes I have full access to the folder.
Here you go!
The below screenshot is when I try to open the log file after the EPERM error:
And this screenshot refers to the ERR_STREAM_DESTROYED message after the log file rotation occurs and my code tries to push data to the log file:
from rotating-file-stream.
Hi @ankityadav1 ,
thank you but there are not the info I need: the first screenshot gives no info while the stack trace of the ERR_STREAM_DESTROIED
is irrelevant.
I need the stack trace of the EPERM
error. The output of this code should contain the info I need.
stream.on('error', err =>
console.log('RFS error -->', err)
)
from rotating-file-stream.
The error has no stack trace.
It is just:
EPERM: operation not permitted, open error '{path to log file/file.log}'
from rotating-file-stream.
I'm sorry @ankityadav1 , but I'm not able to reproduce (so to investigate) the error.
If you could share with me a minimal reproducible example I can try to investigate it.
from rotating-file-stream.
Related Issues (20)
- How to undo the operation of changing default shell for npm on windows 10 ? HOT 1
- Compressed rotated files don't have the `.gz` suffix HOT 3
- cannot find module "fs/promises" with nodejs 12.22.7 HOT 7
- no such file or directory, rename log failed HOT 4
- how to create symlink HOT 3
- Cannot find module 'fs/promises' HOT 6
- Not able to compress log file HOT 3
- [bug] Cannot read properties of undefined (reading 'write') HOT 25
- Rotating log file with size, maxFiles and path options HOT 9
- Unhandled Error, No such file or directory, unlink called twice on same file. HOT 17
- The first rotated file is not specified time length. HOT 1
- Error: this.timeout.unref is not a function HOT 10
- while deploying the project i am getting this error please help HOT 7
- [bug] it does not create the file again when it's writing HOT 1
- Custom compressed file names HOT 4
- how do i do the unit testing in node js HOT 2
- Sometimes crashes on interval change HOT 3
- UTC: interval & intervalBoundary HOT 1
- Jumping from Node v14 to v18 between 3.1.1 and 3.2.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rotating-file-stream.