New answers tagged logging
7
votes
Bash script for manually cleaning up the Traefik access log file and limiting it to a maximum of 50 MB
log rolling races
I can't imagine why you chose to re-invent the wheel here
(and the original posting is not so tagged).
Log rolling is a mature and well studied need,
with good solutions such as the ...
9
votes
Bash script for manually cleaning up the Traefik access log file and limiting it to a maximum of 50 MB
Log rotate
At first it was unclear to me why you chose this approach rather than take advantage of the various log rotate options that are available in Traefik (docs).
But it turns out that Traefik ...
7
votes
Accepted
Bash script for manually cleaning up the Traefik access log file and limiting it to a maximum of 50 MB
Overall, looks good to me. Just some minor nitpicks:
size=$(stat -c%s "$fn")
That's a case where set -e won't ...
Top 50 recent answers are included
Related Tags
logging × 336python × 76
c# × 55
c++ × 50
java × 47
error-handling × 29
performance × 28
python-3.x × 26
beginner × 21
parsing × 21
multithreading × 19
javascript × 17
c × 16
file × 14
object-oriented × 12
go × 11
c++11 × 10
thread-safety × 9
library × 9
php × 8
ruby × 8
.net × 8
c++17 × 8
design-patterns × 7
datetime × 7