Replace error_log() with system logger + refactor system logger integration