Browse code

xlog Minor README updates

Olle E. Johansson authored on 18/12/2014 07:22:01
Showing 2 changed files
... ...
@@ -86,8 +86,7 @@ Chapter 1. Admin Guide
86 86
    This module provides the possibility to print user formatted log or
87 87
    debug messages from Kamailio scripts, similar to the printf function. A
88 88
    C-style printf specifier is replaced with a part of the SIP request or
89
-   other variables from system. Section 2, "Implemented Specifiers" shows
90
-   what can be printed out.
89
+   other variables from system.
91 90
 
92 91
 2. Implemented Specifiers
93 92
 
... ...
@@ -97,7 +96,7 @@ Chapter 1. Admin Guide
97 97
 
98 98
    The most important changes from earlier versions of Kamailio are:
99 99
      * - '%' has been replaced by '$'
100
-     * - to print a header, use now $hdr(header_name[index]) instead of
100
+     * - to print a header, use $hdr(header_name[index]) instead of
101 101
        %{header_name[index]}
102 102
      * - to print an AVP, use now $avp([si]:avp_id[index]) instead of
103 103
        %{[si]:avp_id[index]} or $avp([$avp_alias[index]) instead of
... ...
@@ -146,7 +145,8 @@ modparam("xlog", "buf_size", 8192)
146 146
 
147 147
 4.2. force_color (integer)
148 148
 
149
-   When set to 1, forces color printing even if log_stderror=0.
149
+   When set to 1, forces color codes in log messages even if log_stderror
150
+   is set to 0.
150 151
 
151 152
    Default value is 0.
152 153
 
... ...
@@ -157,8 +157,8 @@ modparam("xlog", "force_color", 0)
157 157
 
158 158
 4.3. long_format (integer)
159 159
 
160
-   When set to 1, prints config file name in xlogl() and xdbgl() before
161
-   line number.
160
+   When set to 1, outputs the configuration file name in xlogl() and
161
+   xdbgl() before the line number.
162 162
 
163 163
    Default value is 0.
164 164
 
... ...
@@ -169,7 +169,7 @@ modparam("xlog", "long_format", 1)
169 169
 
170 170
 4.4. prefix (str)
171 171
 
172
-   Prefix to be printed before the log message.
172
+   Prefix to be output before the log message.
173 173
 
174 174
    Default value is "<script>: ".
175 175
 
... ...
@@ -180,9 +180,9 @@ modparam("xlog", "prefix", "-xlog: ")
180 180
 
181 181
 4.5. log_facility (string)
182 182
 
183
-   Syslog facility to be used when printing xlog messages. In this way you
184
-   can get the xlog messages in a separate syslog file than the debug
185
-   messages issued from source code.
183
+   Syslog facility to be used for the xlog output. By setting this, and
184
+   configuring syslog, you can get the xlog messages in a separate syslog
185
+   file than the debug messages issued from the source code.
186 186
 
187 187
    Default value is NULL (unset - use same facility as source code debug
188 188
    messages).
... ...
@@ -192,13 +192,13 @@ modparam("xlog", "log_facility", "LOG_DAEMON")
192 192
 
193 193
 4.6. log_colors (string)
194 194
 
195
-   Update terminal colors used by core for log levels (when log_stderr=1
196
-   and log_color=1). The value has to be 'logname=colors', where colors is
197
-   two characters specifying foreground and background in the same format
198
-   as $C(xy) variable.
195
+   Update terminal colors used by the Kamailio core for log levels (when
196
+   log_stderr=1 and log_color=1). The value has to be 'logname=colors',
197
+   where colors is two characters specifying foreground and background in
198
+   the same format as $C(xy) variable.
199 199
 
200
-   The parameter can be set many times, its value can also be a
201
-   ';'-separated list of color specs.
200
+   The parameter can be set many times. The value can also be a
201
+   ';'-separated list of color specifications.
202 202
 
203 203
    Default value is NULL.
204 204
 
... ...
@@ -215,11 +215,11 @@ modparam("xlog", "log_colors", "L_ERR=cr;L_WARN=px")
215 215
 
216 216
 5.1. xlog([ [facility,] level,] format)
217 217
 
218
-   Print a formated message using LOG function.
218
+   Output a formated log message.
219 219
 
220 220
    Meaning of the parameters are as follows:
221
-     * facility - The log facility that will be used for this single log
222
-       message.
221
+     * facility - The syslog facility that will be used for this single
222
+       log message.
223 223
        If this parameter is missing, the implicit facility is either the
224 224
        facility set with the 'log_facility' module parameter or the core's
225 225
        log facility.
... ...
@@ -13,15 +13,13 @@
13 13
 	
14 14
 	<title>&adminguide;</title>
15 15
 	
16
-	<section>
16
+	<section id="xlog.overview">
17 17
 	<title>Overview</title>
18 18
 	<para>
19 19
 		This module provides the possibility to print user formatted log or
20 20
 		debug messages from &kamailio; scripts, similar to the printf function. 
21 21
 		A C-style printf specifier is replaced with a part of the &sip; request or other
22 22
 		variables from system.
23
-		<xref linkend="sec-implemented-specifiers"/> shows what can be printed
24
-		out.
25 23
 	</para>
26 24
 	</section>
27 25
 	<section id="sec-implemented-specifiers">
... ...
@@ -42,7 +40,7 @@
42 42
 		</listitem>
43 43
 		<listitem>
44 44
 		<para>
45
-		- to print a header, use now $hdr(header_name[index]) instead of
45
+		- to print a header, use $hdr(header_name[index]) instead of
46 46
 		%{header_name[index]}
47 47
 		</para>
48 48
 		</listitem>
... ...
@@ -117,7 +115,7 @@ modparam("xlog", "buf_size", 8192)
117 117
 	<section id="xlog.p.force_color">
118 118
 		<title><varname>force_color</varname> (integer)</title>
119 119
 		<para>
120
-		When set to 1, forces color printing even if log_stderror=0.
120
+		When set to 1, forces color codes in log messages even if <varname>log_stderror</varname> is set to 0.
121 121
 		</para>
122 122
 		<para>
123 123
 		<emphasis>
... ...
@@ -136,8 +134,8 @@ modparam("xlog", "force_color", 0)
136 136
 	<section id="xlog.p.long_format">
137 137
 		<title><varname>long_format</varname> (integer)</title>
138 138
 		<para>
139
-		When set to 1, prints config file name in xlogl() and xdbgl()
140
-		before line number.
139
+		When set to 1, outputs the configuration file name in xlogl() and xdbgl()
140
+		before the line number.
141 141
 		</para>
142 142
 		<para>
143 143
 		<emphasis>
... ...
@@ -156,7 +154,7 @@ modparam("xlog", "long_format", 1)
156 156
 	<section id="xlog.p.varname">
157 157
 		<title><varname>prefix</varname> (str)</title>
158 158
 		<para>
159
-		Prefix to be printed before the log message.
159
+		Prefix to be output before the log message.
160 160
 		</para>
161 161
 		<para>
162 162
 		<emphasis>
... ...
@@ -175,9 +173,9 @@ modparam("xlog", "prefix", "-xlog: ")
175 175
 	<section id="xlog.p.log_facility">
176 176
 		<title><varname>log_facility</varname> (string)</title>
177 177
 		<para>
178
-		Syslog facility to be used when printing xlog messages.
179
-		In this way you can get the xlog messages in a separate syslog file
180
-		than the debug messages issued from source code.
178
+		Syslog facility to be used for the xlog output.
179
+		By setting this, and configuring syslog, you can get the xlog messages 
180
+		in a separate syslog file than the debug messages issued from the source code.
181 181
 		</para>
182 182
 		<para>
183 183
 		Default value is NULL (unset - use same facility as source code debug
... ...
@@ -193,14 +191,14 @@ modparam("xlog", "log_facility", "LOG_DAEMON")
193 193
 	<section id="xlog.p.log_colors">
194 194
 		<title><varname>log_colors</varname> (string)</title>
195 195
 		<para>
196
-		Update terminal colors used by core for log levels (when log_stderr=1
196
+		Update terminal colors used by the &kamailio; core for log levels (when log_stderr=1
197 197
 		and log_color=1). The value has to be 'logname=colors', where colors
198 198
 		is two characters specifying foreground and background in the same
199 199
 		format as $C(xy) variable.
200 200
 		</para>
201 201
 		<para>
202
-		The parameter can be set many times, its value can also be a
203
-		';'-separated list of color specs.
202
+		The parameter can be set many times. The value can also be a
203
+		';'-separated list of color specifications.
204 204
 		</para>
205 205
 		<para>
206 206
 		Default value is NULL.
... ...
@@ -222,12 +220,12 @@ modparam("xlog", "log_colors", "L_ERR=cr;L_WARN=px")
222 222
 		<function moreinfo="none">xlog([ [facility,] level,] format)</function>
223 223
 		</title>
224 224
 		<para>
225
-		Print a formated message using LOG function.
225
+		Output a formated log message.
226 226
 		</para>
227 227
 		<para>Meaning of the parameters are as follows:</para>
228 228
 		<itemizedlist>
229 229
 		<listitem>
230
-			<para><emphasis>facility</emphasis> - The log facility that will be used for this single log message.
230
+			<para><emphasis>facility</emphasis> - The syslog facility that will be used for this single log message.
231 231
 			</para>
232 232
 			<para>
233 233
 			If this parameter is missing, the implicit facility is either the facility set with