c++boostboost-logging

C++ Boost Logging: how to zip logs?


I need to zip logs, produced by Boost Logging library. I see 2 approaches:

  1. Compress logs on the fly to BZip or GZip - preferably
  2. Compress logs when rotating (make copy of log and zip it).

How do I implement this?


Solution

  • Boost has gzip filters, which could be attached to a logging sink.