-function log() {
- error_log(sprintf("%s: %s\n", date("[Y-m-d H:i:s]"),
- call_user_func_array("sprintf", func_get_args())));
+function logger() {
+ if (!ini_get("date.timezone")) {
+ date_default_timezone_set(@date_default_timezone_get());
+ }
+ error_log(sprintf("%s(%s): %s",
+ basename(getenv("SCRIPT_FILENAME"), ".php"),
+ basename(current(get_included_files()), ".inc"),
+ call_user_func_array("sprintf", func_get_args())
+ ));