Why Nette uses error_log?
- Eda
- Backer | 220
Hi.
My webhosting disables calling of function error_log, which is used in Nette here: https://api.nette.org/…ger.php.html#59
Why is Nette using this function? Which benefits it provides? Wouldn't be better to use only some fwrite, if error_log is used with second parametr equal 3 – it only appends message to error file?
I know I can solve my problem with writing my own Logger, but I am interested which benefits error_log has :-)
Thx.
Last edited by Eda (2013-12-20 15:39)
- Filip Procházka
- Moderator | 4668
I'm reading the comments, and it seems like there are more problems than benefits (simplicity is probably the only one).
Last edited by Filip Procházka (2013-12-20 18:21)
- David Grudl
- Nette Core | 8218
If your webhosting disables function error_log, you have probably bigger problem.
Error_log is used because it supports limiting of log size and (I hope) file locking. But it can be replaced with file_put_contents().