iccicci / rotating-file-stream

Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.
MIT License
286 stars 39 forks source link

Peculiar observation in Windows. Output text file is updated only when the file is either 'tailed' or 'type <filename>' #105

Open termsofservice212 opened 1 month ago

termsofservice212 commented 1 month ago

Hello all,

Thought to raise this question because it's been bugging me for over a day. I am using rotating-file-stream on Win11 and it produces a text file. The size of this text file is never updated until I

  1. refresh the file in Windows Explorer by clicking on the file, or
  2. tail the file (eg Get-Content <filename> -Wait), or
  3. type the file (eg type <filename>)

I realise this is a Windows issue. Can anyone share why this is the case?

iccicci commented 1 month ago

I'm sorry, but I really don't know: I do not use windows.

I can leave the issue open, so if somebody from the community have some ideas...