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

Function write_logline

server/log.c:1141–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139}
1140
1141static void write_logline(char *errstr, apr_size_t len, apr_file_t *logf,
1142 int level)
1143{
1144 /* NULL if we are logging to syslog */
1145 if (logf) {
1146 /* Truncate for the terminator (as apr_snprintf does) */
1147 if (len > MAX_STRING_LEN - sizeof(APR_EOL_STR)) {
1148 len = MAX_STRING_LEN - sizeof(APR_EOL_STR);
1149 }
1150 strcpy(errstr + len, APR_EOL_STR);
1151 apr_file_puts(errstr, logf);
1152 apr_file_flush(logf);
1153 }
1154#ifdef HAVE_SYSLOG
1155 else {
1156 syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%.*s",
1157 (int)len, errstr);
1158 }
1159#endif
1160}
1161
1162static void log_error_core(const char *file, int line, int module_index,
1163 int level,

Callers 1

log_error_coreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected