Rework core.log:
In case of problem log with php error_log()
Introduce write2 method to better transmit log to the loggers

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>