Git Product home page Git Product logo

Comments (7)

iccicci avatar iccicci commented on June 30, 2024

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.

ankityadav1 avatar ankityadav1 commented on June 30, 2024

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.

iccicci avatar iccicci commented on June 30, 2024

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.

ankityadav1 avatar ankityadav1 commented on June 30, 2024

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:
image

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:
image

from rotating-file-stream.

iccicci avatar iccicci commented on June 30, 2024

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.

ankityadav1 avatar ankityadav1 commented on June 30, 2024

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.

iccicci avatar iccicci commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.