]> granicus.if.org Git - apache/commitdiff
Add some more items
authorStefan Fritsch <sf@apache.org>
Sat, 25 Sep 2010 11:12:44 +0000 (11:12 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 25 Sep 2010 11:12:44 +0000 (11:12 +0000)
Add section about how to handle logging changes

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001193 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/developer/new_api_2_4.xml

index 21bc4e0e06977c0f0f8dc98a5b734019af09a616..90930074fc2b0318366e67520aeee72f71f514c3 100644 (file)
@@ -44,6 +44,9 @@
      HTML reference with <code>make docs</code>.</p>
 </summary>
 
+<section id="api_changes">
+  <title>Changed APIs</title>
+
   <section id="ap_expr">
     <title>ap_expr (NEW!)</title>
     <p>Introduces a new API to parse and evaluate boolean and algebraic
       <li>REMOVED ap_default_type, ap_requires, all 2.2 authnz API</li>
       <li>Introduces Optional Functions for logio and authnz</li>
       <li>New function ap_get_server_name_for_url to support ipv6 literals.</li>
+      <li>New function ap_register_errorlog_handler to register errorlog
+          format string handlers.</li>
     </ul>
   </section>
 
     <ul>
       <li>Introduce per-directory, per-module loglevel</li>
       <li>New loglevels APLOG_TRACEn</li>
+      <li>Introduce errorlog ids for requests and connections</li>
       <li>Support for mod_request kept_body</li>
       <li>Support buffering filter data for async requests</li>
       <li>New CONN_STATE values</li>
     <p>NEW: ap_recent_ctime_ex</p>
   </section>
 
+</section>
+
+<section id="upgrading">
+  <title>Specific information on upgrading modules from 2.2</title>
+
+  <section id="upgrading_logging">
+    <title>Logging</title>
+    <p>In order to take advantage of per-module loglevel configuration, any
+       source file that calls the <code>ap_log_*</code> functions should declare
+       which module it belongs to. If the module's module_struct is called
+       <code>foo_module</code>, the following code can be used to remain
+       backward compatible with HTTPD 2.0 and 2.2:</p>
+    <example>
+        #include &lt;http_log.h&gt;<br/>
+        <br/>
+        #ifdef APLOG_USE_MODULE<br/>
+        APLOG_USE_MODULE(foo)<br/>
+        #endif
+    </example>
+    <p>The number of parameters of the <code>ap_log_*</code> functions and the
+       definition of <code>APLOG_MARK</code> has changed. Normally, the change
+       is completely transparent. However, if a module implements wrapper
+       functions for <code>ap_log_*</code> and uses <code>APLOG_MARK</code>
+       when calling these wrappers, some adjustments are necessary.
+       The easiest way is for the module to define and use a different macro
+       that expands to the parameters required by the log wrapper functions.
+       <code>APLOG_MARK</code> should only be used when calling
+       <code>ap_log_*</code> without additional wrappers. In this way, the
+       code will remain compatible with HTTPD 2.0 and 2.2.</p>
+  </section>
+
+</section>
+
 </manualpage>