how to make a log fiunction code example
Example 1: log2 in python
math.log2(x) #x is a number
Example 2: setup logrotate
# Specify the dir that you would like to rotate in the first line.
# You can use daily, weekly or monthly rotation
# On 'rotate' section you can define how many days the log will be kept.
/home/ubuntu/log_dir/* {
daily
rotate 7
size 100M
compress
dateext
dateformat -%d%m%Y
}