else if (SvROK(sv) && sv_isa(sv, "Apache::Log::ServerRec")) {
else if (SvROK(sv) && sv_isa(sv, "Apache::Log::Server")) {
static void mpxs_ap_log_error(pTHX_ int level, SV *sv, SV *msg){    char *file = NULL;    int line = 0;    char *str;    SV *svstr = Nullsv;    STRLEN n_a;    int lmask = level & APLOG_LEVELMASK;    server_rec *s;    request_rec *r = NULL;    if (SvROK(sv) && sv_isa(sv, "Apache::Log::Request")) {        r = (request_rec *)SvObjIV(sv);        s = r->server;    }    else if (SvROK(sv) && sv_isa(sv, "Apache::Log::ServerRec")) {        s = (server_rec *)SvObjIV(sv);    }    else {        s = modperl_global_get_server_rec();    }    if ((lmask == APLOG_DEBUG) && (s->loglevel >= APLOG_DEBUG)) {        COP *cop = PL_curcop;        file = CopFILE(cop); /* (caller)[1] */        line = CopLINE(cop); /* (caller)[2] */    }    if ((s->loglevel >= lmask) &&         SvROK(msg) && (SvTYPE(SvRV(msg)) == SVt_PVCV)) {        dSP;        ENTER;SAVETMPS;        PUSHMARK(sp);        (void)call_sv(msg, G_SCALAR);        SPAGAIN;        svstr = POPs;        (void)SvREFCNT_inc(svstr);        PUTBACK;        FREETMPS;LEAVE;        str = SvPV(svstr,n_a);    }    else {        str = SvPV(msg,n_a);    }    if (r) {        ap_log_rerror(file, line, level, 0, r, "%s", str);    }    else {        ap_log_error(file, line, level, 0, s, "%s", str);    }    if (svstr) {        SvREFCNT_dec(svstr);    }}