I have a esi version of caddy running and i have seen that the logs have grown quite large in size.
I was wondering if i can truncate the logs with the following command or if it will cause caddy to crash.
" > esi-prod_debug.log"
The log in question looks as follows
3.0G esi-prod_debug.log
log / /opt/caddy/logs/esi-prod_debug.log {
rotate_size 10 # 10 MB
rotate_age 31 # 31 days
rotate_keep 10 # keep 10 files
}
but then it follows with the following :
May 09 09:05:48 [29575]: 2019/05/09 09:05:48 /etc/caddy/Caddyfile:60 - Error during parsing: Unknown directive ‘rotate_size’
May 09 09:05:48 systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
May 09 09:05:48 systemd[1]: caddy.service: Unit entered failed state.
is appending the file a option with the following command
" > esi-prod_debug.log"
I checked the rest of the rotates in caddy file are exactly the same but they seem to be working.