From 1e82ef702f9a0c3dec3e24e4f91dc879d7ba5280 Mon Sep 17 00:00:00 2001
From: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu, 2 Jan 2014 20:39:43 +0100
Subject: [PATCH] acc: add documentation note indicating the use of
 pseudo-variables

---
 modules/acc/doc/acc_admin.xml | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

--- a/modules/acc/doc/acc_admin.xml
+++ b/modules/acc/doc/acc_admin.xml
@@ -1479,7 +1479,7 @@
 
 	<section>
 	<title>Functions</title>
-	<section>
+	<section id="acc.f.acc_log_request">
 		<title>
 			<function moreinfo="none">acc_log_request(comment)</function>
 		</title>
@@ -1495,6 +1495,7 @@
 		<itemizedlist>
 		<listitem>
 			<para><emphasis>comment</emphasis> - Comment to be appended.
+			The string can contain any number of pseudo-variables.
 			</para>
 		</listitem>
 		</itemizedlist>
@@ -1506,11 +1507,14 @@
 		<programlisting format="linespecific">
 ...
 acc_log_request("Some comment");
+$var(code) = 404;
+$avp(reason) = "Not found";
+acc_log_request("$var(code) Error: $avp(reason)");
 ...
 </programlisting>
 		</example>
 	</section>
-	<section>
+	<section id="acc.f.acc_db_request">
 		<title>
 			<function moreinfo="none">acc_db_request(comment, table)</function>
 		</title>
@@ -1525,7 +1529,9 @@
 		</para>
 		<itemizedlist>
 		<listitem>
-			<para><emphasis>comment</emphasis> - Comment to be appended.</para>
+			<para><emphasis>comment</emphasis> - Comment to be appended.
+			The string can contain any number of pseudo-variables.
+			</para>
 		</listitem>
 		<listitem>
 			<para><emphasis>table</emphasis> - Database table to be used. It
@@ -1541,11 +1547,12 @@
 ...
 acc_db_request("Some comment", "SomeTable");
 acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
+acc_db_request("$var(code) Error: $avp(reason)", "SomeTable");
 ...
 </programlisting>
 		</example>
 	</section>
-	<section>
+	<section id="acc.f.acc_rad_request">
 		<title>
 			<function moreinfo="none">acc_rad_request(comment)</function>
 		</title>
@@ -1560,6 +1567,7 @@
 		<itemizedlist>
 		<listitem>
 			<para><emphasis>comment</emphasis> - Comment to be appended.
+			The string can contain any number of pseudo-variables.
 			</para>
 		</listitem>
 		</itemizedlist>
@@ -1571,11 +1579,12 @@
 		<programlisting format="linespecific">
 ...
 acc_rad_request("Some comment");
+acc_rad_request("$var(code) Error: $avp(reason)");
 ...
 </programlisting>
 		</example>
 	</section>
-	<section>
+	<section id="acc.f.acc_diam_request">
 		<title>
 			<function moreinfo="none">acc_diam_request(comment)</function>
 		</title>
@@ -1589,6 +1598,7 @@
 		<itemizedlist>
 		<listitem>
 			<para><emphasis>comment</emphasis> - Comment to be appended.
+			The string can contain any number of pseudo-variables.
 			</para>
 		</listitem>
 		</itemizedlist>
@@ -1600,6 +1610,7 @@
 		<programlisting format="linespecific">
 ...
 acc_diam_request("Some comment");
+acc_diam_request("$var(code) Error: $avp(reason)");
 ...
 </programlisting>
 		</example>
