question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compression Issues on Windows

See original GitHub issue

My deployment environment is linux, however I am working on development in Windows; my code might work in linux, but it’s certainly not working on Windows and having unusual behavior.

I tried setting compress to true, and had problems… but then I realized that perhaps my Windows installation didn’t have the compression binaries that rotating-file-stream is expecting, so I overrode it with my own function and having the same problem:

let compressFunction = (source, dest) => 'tar -czf "' + dest + '" "' + source + '"';

if (accessLogging) {
  let accessLogStream = rfs(accessLogName, {
    interval: '60s',
    compress: compressFunction,
    path: path.join(accessLogPath, accessLogName)
  })
  app.use(morgan(accessLogFormat, { stream: accessLogStream }))
}

When compress isn’t enabled, it rotates as expected. However with compress specified as above, the files that are written do appear to be blank (pre-compression) and then aren’t actually compressed.

It appears when it’s trying to compress the files, it’s executing the temporary file itself, as I get a prompt to “Choose app to open SUCHANDSUCH.tmp” at the interval about on par with what I have specified.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Alpha4615commented, Jun 19, 2019

Thanks, keep me apprised.

On Wed, Jun 19, 2019, 10:38 Daniele Ricci notifications@github.com wrote:

Hi @Alpha4615 https://github.com/Alpha4615 ,

I did a quick check and I saw there is a lot of work to do in order to make rotating-file-stream fully compliant with windows; so to unlock you, I hope solution we previously discussed could be enough, on the other hand I’ll work in next days (or better next weeks) to make rotating-file-stream compliant with windows as well.

Hope this helps, iCC

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iccicci/rotating-file-stream/issues/37?email_source=notifications&email_token=AA252YKRNNS3OQDPT2B4CDLP3JAGRA5CNFSM4HYYITJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCCT2A#issuecomment-503589352, or mute the thread https://github.com/notifications/unsubscribe-auth/AA252YKF3STT6JI7NO5ZW5TP3JAGRANCNFSM4HYYITJA .

0reactions
icciccicommented, Nov 24, 2019

Hi @Alpha4615 ,

I just released v2.0.0, it should be fully Windows compliant (at least all tests are now OK).

Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Update does not install files if compression is ...
Fix an issue in which Windows Update does not install on a Windows 10 Technical Preview-based computer that has system compression enabled.
Read more >
How to Fix Windows 10 When It Automatically Compresses ...
1. Delete Unnecessary Files · 2. Disable File Compression · 3. Rebuild Icon Cache Database · No More Compressed Files. Hopefully, Windows stopped ......
Read more >
Windows automatically compressing files? Here's the fix!
1] Disable Compression on the Drive · Firstly, open the File Explorer and go to the drive causing the problem. · After that,...
Read more >
Windows 10 Automatically Compressing FIX - YouTube
Windows 10 Automatically Compressing FIXYour computer may be compressing files if its hard disk is running out of space (especially, ...
Read more >
Microsoft fixes Windows SMB compression 'idiosyncrasy' • ...
With the latest updates, "if you request compression over SMB, we will attempt to compress the file regardless of its size or seeming ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found