Thread Safe custom logging in PHP

I read a lot of rediculous and convoluted suggestions as to how one would create a custom log in php, the problem of course making in thread safe in a web server environment.

Well it turns out to be this simple

error_log($LOGG_MESSAGE.”\n”,3,$YOUR_LOG_FILE);

the 3 is important, see here

Digg!