MCPcopy Create free account
hub / github.com/apache/httpd / log_apr_status

Function log_apr_status

server/log.c:789–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787}
788
789static int log_apr_status(const ap_errorlog_info *info, const char *arg,
790 char *buf, int buflen)
791{
792 apr_status_t status = info->status;
793 int len;
794 if (!status)
795 return 0;
796
797 if (status < APR_OS_START_EAIERR) {
798 len = apr_snprintf(buf, buflen, "(%d)", status);
799 }
800 else if (status < APR_OS_START_SYSERR) {
801 len = apr_snprintf(buf, buflen, "(EAI %d)",
802 status - APR_OS_START_EAIERR);
803 }
804 else if (status < 100000 + APR_OS_START_SYSERR) {
805 len = apr_snprintf(buf, buflen, "(OS %d)",
806 status - APR_OS_START_SYSERR);
807 }
808 else {
809 len = apr_snprintf(buf, buflen, "(os 0x%08x)",
810 status - APR_OS_START_SYSERR);
811 }
812 apr_strerror(status, buf + len, buflen - len);
813 len += strlen(buf + len);
814 return len;
815}
816
817static int log_server_name(const ap_errorlog_info *info, const char *arg,
818 char *buf, int buflen)

Callers 1

do_errorlog_defaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected