How to correctly clear the .log file

I am scraping the log file and pushing those logs to an external service; I would like to clear/delete the .log file after a successful upload. Is it safe to remove the file, or is there a proper way to clear the saved logs to avoid race conditions or interruptions to reads/writes within the Nakama framework?

Thanks for any insight.

  1. Versions: Nakama 3.17, Docker
  2. Server Framework Runtime language Go

Hello @BergerBytes,

I think you are looking for the logs rotation’s configuration. Check the additional max_backups and max_size to parameterize it to your needs.