logger writing to STDERR or error_log depending on php in cli or cgi mode.