Closed Michael-xT closed 4 years ago
To be honest if this enhancement will be implemented, it should be enabled by default
The following implementation is pending merge
Proposal to file structure:
logs\
folder by default (no option to change it in config other than symlink etc.)latest.log
will have recent logs (actually running instance or last run)2020-01-13-*.log
will be the log with content from latest.log after next server run (asterisk will be replaced by number from 1 to unlimited)2020-01-13-*.log
should be packed in separate archive (presumably gz format)How it would work:
latest.log
would be renamed/copied to 2020-01-13-*.log
with asterisk replaced by smallest free number and archived into 2020-01-13-*.log.gz
. Server will continue to log into blank latest.log
Could be useful for lazy people, but this may not be sufficient for everyone. I name files according to ISO8601 and a file should not exceed a certain size. I also like when there is a maximal number of files and if that limit is reached, older files are deleted.
Imho, altv should not handle log rollover (A twelve-factor app never concerns itself with routing or storage of its output stream. It should not attempt to write to or manage logfiles).
You're reinventing the wheel, there are a lot of tools in the wild (multilog, logrotate, ...).
You can make use of --logfile https://wiki.altv.mp/Command-line_Args
Hello, if it is possible, actually im sure it is but anyway, could you make a new config.log option like
keep-logs : true
in order for it to keep every server log? It would be very nice to have this option for everyone, not making another script even if it is possible, it would be nice because for example I use logs in console. Also a good ideea would be to keep this logs in a /logs folder , I mean the logs with timestamp and the one without. Thank you for your time!