Thanks Brenden for quickest response.
In my local environment, i tested this scenario by inserting dummy items to event log. After i insert around 1800 records to "CMS_EventLog" table, the stored procedure was triggered like this.
exec Proc_CMS_EventLog_DeleteOlderLogs @LogMaxSize=2000,@SiteId=0,@MaxToDelete=50000
I don't know why it is sending @SiteId as zero(0). Because of this no records are deleted. I have siteId as 5 in "CMS_site" table and that is the only records in "CMS_Site" table.
When i query "CMS_EvenLog" table with SiteId = 5 i got around 2900 records. I think some of these records has to be deleted right?