easyloggingpp icon indicating copy to clipboard operation
easyloggingpp copied to clipboard

Add strict permissions flag

Open MisterTea opened this issue 4 years ago • 0 comments

Hey all! Thanks for creating a beautiful and simple logging library.

We use easyloggingpp in Eternal Terminal ( https://github.com/MisterTea/EternalTerminal ) and would like the logs to only be readable by the user and group that created them (especially for logs created by root). This PR adds a compile flag for that.

A couple of points:

  1. I'm not sure if a compile flag is the right approach, but it looked like creating an option would require us to pass the option all the way down to file creation, which could be a much bigger change.
  2. If the flag is on, I try to bring in std::filesystem to ensure that the correct permissions are set on unix and windows. If this is too large of a footprint, we could do it only for unix.

This is a

  • [ ] Breaking change
  • [X] New feature
  • [ ] Bugfix

I have

  • [X] Merged in the latest upstream changes
  • [ ] Updated CHANGELOG.md
  • [ ] Updated README.md
  • [X] Run the tests

MisterTea avatar Nov 02 '21 03:11 MisterTea