logrotate – Log rotation is not working properly


I have created a log rotation, but it doesn't seem to work for me because it contains a large number of files like "smartfox.log.2020-01-05-07.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1. 1.1 "created .1.1"

In addition, Rotation 3 and Maxsize 100M don't work either because I see files that are older than 3 days and larger than 100M.

If a wrong log rotation is to delete a file that is older than 3 days and only keep 100 million log files:

admin@ip-172-20-44-75:/etc/logrotate.d$ cat   /etc/logrotate.d/smartfox-qa
/var/log/cog-qa/smartfox-qa/*{

        rotate 3
        copytruncate
        missingok
        notifempty
        delaycompress
        maxsize 100M
        daily
        create 0644 root root
}

admin @ ip-172-20-44-75: / var / log / cog-qa / smartfox-qa $ ls -lthr

-rw-r--r-- 1 root root    0 Jan  6 03:18 smartfox.log.2020-01-05-13.1.1.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 655M Jan  6 03:18 smartfox.log.2020-01-05-14.1.1.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:18 smartfox.log.2020-01-05-14.1.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 656M Jan  6 03:18 smartfox.log.2020-01-05-15.1.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:18 smartfox.log.2020-01-05-15.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 653M Jan  6 03:18 smartfox.log.2020-01-05-16.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:18 smartfox.log.2020-01-05-16.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 661M Jan  6 03:18 smartfox.log.2020-01-05-17.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:18 smartfox.log.2020-01-05-17.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 660M Jan  6 03:19 smartfox.log.2020-01-05-18.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:19 smartfox.log.2020-01-05-18.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 665M Jan  6 03:19 smartfox.log.2020-01-05-19.1.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:19 smartfox.log.2020-01-05-19.1.1.1.1.1.1.1
-rw-r--r-- 1 root root 658M Jan  6 03:19 smartfox.log.2020-01-05-20.1.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:19 smartfox.log.2020-01-05-20.1.1.1.1.1.1
-rw-r--r-- 1 root root 675M Jan  6 03:19 smartfox.log.2020-01-05-21.1.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:19 smartfox.log.2020-01-05-21.1.1.1.1.1
-rw-r--r-- 1 root root 656M Jan  6 03:19 smartfox.log.2020-01-05-22.1.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:20 smartfox.log.2020-01-05-22.1.1.1.1
-rw-r--r-- 1 root root 660M Jan  6 03:20 smartfox.log.2020-01-05-23.1.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:20 smartfox.log.2020-01-05-23.1.1.1
-rw-r--r-- 1 root root 649M Jan  6 03:20 smartfox.log.2020-01-06-00.1.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:20 smartfox.log.2020-01-06-00.1.1
-rw-r--r-- 1 root root 662M Jan  6 03:20 smartfox.log.2020-01-06-01.1.1
-rw-r--r-- 1 root root    0 Jan  6 03:20 smartfox.log.2020-01-06-01.1
-rw-r--r-- 1 root root 661M Jan  6 03:20 smartfox.log.2020-01-06-02.1
-rw-r--r-- 1 root root    0 Jan  6 03:20 smartfox.log.2020-01-06-02

Please let me know where I am wrong!