apparmor/changehat/mod_apparmor
Steve Beattie 637a6bfe9f mod_apparmor: fix logging
The apache2 mod_apparmor module was failing to log debugging messages
when the apache loglevel was set to debug or lower (i.e. traceN). This
patch fixes it by using ap_log_rerror() (for request specific messages,
with the request passed for context) and ap_log_error() (more general
messages outside of a request context).

Also, the APLOG_USE_MODULE macro is called, to mark the log messages as
belonging to the apparmor module, so that the apache 2.4 feature of
enabling debug logging for just the apparmor module will work, with an
apache configuration entry like:

  LogLevel apparmor:debug

See

  http://ci.apache.org/projects/httpd/trunk/doxygen/group__APACHE__CORE__LOG.html

for specific about the ap_log_*error() and APLOG_USE_MODULE functions
and macros, and

  http://httpd.apache.org/docs/2.4/mod/core.html.en#loglevel

for the bits about module specific logging.

Patch history:
  v1: initial version
  v2: - revert to using ap_log_error with (the 2.4 specific)
        ap_server_conf outside of a request specific context, as the
        pool specific ap_log_perror messages weren't being reported.
      - add compatibility workaround for apache 2.2
  v3: keep commented out merge function's log call consistent with the
      others

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:38:31 -08:00
..
apache2-mod_apparmor.spec.in as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
COPYING.LGPL Import the rest of the core functionality of the internal apparmor 2006-04-11 21:52:54 +00:00
frob_sysconfig as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Makefile Convert make errors finding libapparmor to only occur when building 2014-01-09 12:11:19 -08:00
mod_apparmor.c mod_apparmor: fix logging 2014-01-23 13:38:31 -08:00
mod_apparmor.conf Import the rest of the core functionality of the internal apparmor 2006-04-11 21:52:54 +00:00
mod_apparmor.pod fix broken URLs in various utils/*.pod files. 2013-09-19 21:17:39 +02:00