Applications / code security
First of all, if you don't trust one application to not clobber the log file of another one, then you have a really serious problem.  `Cos the applications could also do other more harmful things.  If the applications are believed to be insecure or untrustworthy, the most secure answer is to not run them at all.
If you are concerned that applications might accidentally write to the same log file1, just configure them to use different log file names or different log file directories2.
If you are simply trying to secure the logging, then one solution is to do your logging via an independent (secure) logging service such as Linux syslog.
Another approach is to create separate accounts for running each of the applications, and make sure that you set the file and directory access so that one application doesn't have permission to modify another's log file.

1 - Actually applications can safely write to the same file if they all open the logfile in "append" mode.  Log file rotation could be problematic though.
2 - You've probably already thought of that.
I have a 5 applications(programmed in 5 different languages) deployed in one common web server and these applications are written to work on a particular task and create a log file for any action. How can we achieve a security of log file by not being over written by other applications?