0

There is a situation in my program where I need to gather all the log files created until now, zip them all and save them. The problem is that the current log file can't be zipped because it's still open to writing.

I think the best solution can be if I can roll the log file and then I can zip them all, but I can't figure out how to do it. Is this even possible?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
yogev levi
  • 369
  • 1
  • 4
  • 21

1 Answers1

0

You can try to copy the current log file to some different file and try to zip the copied one.