Name
ap_log_error — log an error
Synopsis
void ap_log_error (const char *file, int line, int level, const server_rec *s, const char *fmt, ...)
Logs an error (if level
is higher than the level
set with the LogLevel
directive).
file
and line
are only logged
if level
is APLOG_DEBUG
.
file
and line
are normally set
by calling ap_log_error()
like so:
ap_log_error(APLOG_MARK, APLOG_ERR, server_conf,"some error");
APLOG_MARK
is a #define
that
uses _ _FILE_ _
and _ _LINE_ _
to generate the filename and line number of the call.
level
is a combination of one of the following:
-
APLOG_EMERG
Unusable system.
-
APLOG_ALERT
Action to be taken immediately.
-
APLOG_CRIT
Critical conditions.
-
APLOG_ERR
Error conditions.
-
APLOG_WARNING
Warnings.
-
APLOG_NOTICE
Normal but significant condition.
-
APLOG_INFO
Informational.
-
APLOG_DEBUG
Debugging messages.
These can be optionally
OR
ed with the following:-
APLOG_NOERRNO
Do not log
errno
.-
APLOG_WIN32ERROR
On Win32, use
GetLastError()
instead oferrno
.
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.