I made the attached patch to set 0666 permissions to log files when they are created.
In LAMP production env, usually it's the apache user that creates the log file and usually it's with rw-r--r-- permissions. Say now that the application admin wants to run some tasks (or tests, ...) and that tasks need to log some infos. The application admin doesn't log in with the apache user, he usually uses its own login. He usually neither uses root login because he's not the server admin (shared hosting, server hosted by a hosting company, ...). And then, the task fails (or throws an exception) cause it can't write into the log file.
Problem is the same when the application admin runs a script that creates the log file and then the apache user tries to write into it.
In fact, a task called 'permissions' already exists to set the right permissions. But this task also fails because the user that runs it still don't have the right to change the permissions.
That's why I submit this patch that set 0666 permissions to log files when they are created.