#6622 Logger refactoring: log as in CLI with PHP-CGI for the archiving