HI Saravana
you forgot mention the size in the form of Bytes. it should be 5M not 5. Please check below log formates , please use which are suitable for ur environment
CustomLog "|/path/to/IHS/bin/rotatelogs /var/logs/logfile 86400" common
This creates the files /var/logs/logfile.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time (here after 24 hours) a new log is started.
CustomLog "|/path/to/IHS/bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common
This creates the files /var/logs/logfile.yyyy.mm.dd where yyyy is the year, mm is the month, and dd is the day of the month. Logging will switch to a new file every day at midnight, local time.
CustomLog "|/path/to/IHS/bin/rotatelogs /var/logs/logfile 5M" common
This configuration will rotate the logfile whenever it reaches a size of 5 megabytes.
ErrorLog "|/path/to/IHS/bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M"
THanks