ChestShop (iConomyChestShop)

ChestShop (iConomyChestShop)

6M Downloads

Automatically archive log file

x1p opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.

Log files can grow large if not paid attention to.
I sometimes forget to rename log files to archive them.

Describe the solution you'd like

A mechanism to close current log file and start a new one.
Conditions could be something like when a e.g. 5000 lines is reached.
File renaming chosen by ChestShop. Example:

  • ChestShop1.log
  • ChestShop2.log
    etc.

Describe alternatives you've considered

The alternative is to manually rename file on a running server.
Ideally, the server would be shut down first. But this is not very convenient if uptime is desired.

Additional context

commented

So I looked into this and it seems like the easiest way is by specifying a max size and log file amount that it will cycle through. While this might at least to an extend solve your issue it's not ideal imo. as it will result in lost data (due to it overwriting the oldest file) as well as create files that don't have an ideal format as well as no ability to specify how the format is.

Imo. the easiest solution would be to use logrotate or some other log rotation program and move the file yourself to have full control but I'll leave this open, maybe I or someone comes up with a good solution for this.