This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[sfrench/samba-autobuild/.git] / docs / htmldocs / using_samba / ch04_08.html
1 <HTML>
2 <HEAD>
3 <TITLE>
4 [Chapter 4] 4.8 Logging Configuration Options</title><META NAME="DC.title" CONTENT=""><META NAME="DC.creator" CONTENT=""><META NAME="DC.publisher" CONTENT="O'Reilly &amp; Associates, Inc."><META NAME="DC.date" CONTENT="1999-11-05T21:32:18Z"><META NAME="DC.type" CONTENT="Text.Monograph"><META NAME="DC.format" CONTENT="text/html" SCHEME="MIME"><META NAME="DC.source" CONTENT="" SCHEME="ISBN"><META NAME="DC.language" CONTENT="en-US"><META NAME="generator" CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"></head>
5 <BODY BGCOLOR="#FFFFFF" TEXT="#000000" link="#990000" vlink="#0000CC">
6 <table BORDER="0" CELLPADDING="0" CELLSPACING="0" width="90%">
7 <tr>
8 <td width="25%" valign="TOP">
9 <img hspace=10 vspace=10 src="gifs/samba.s.gif" 
10 alt="Using Samba" align=left valign=top border=0>
11 </td>
12 <td height="105" valign="TOP">
13 <br>
14 <H2>Using Samba</H2>
15 <font size="-1">
16 Robert Eckstein, David Collier-Brown, Peter Kelly
17 <br>1st Edition November 1999
18 <br>1-56592-449-5, Order Number: 4495
19 <br>416 pages, $34.95
20 </font>
21 <p> <a href="http://www.oreilly.com/catalog/samba/">Buy the hardcopy</a>
22 <p><a href="index.html">Table of Contents</a>
23 </td>
24 </tr>
25 </table>
26 <hr size=1 noshade>
27 <!--sample chapter begins -->
28
29 <center>
30 <DIV CLASS="htmlnav">
31 <TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0">
32 <TR>
33 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">
34 <A CLASS="sect1" HREF="ch04_07.html" TITLE="4.7 Virtual Servers">
35 <IMG SRC="gifs/txtpreva.gif" ALT="Previous: 4.7 Virtual Servers" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
36 <B>
37 <FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">
38 <A CLASS="chapter" REL="up" HREF="ch04_01.html" TITLE="4. Disk Shares ">
39 Chapter 4<br>
40 Disk Shares </a></font></b></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
41 <A CLASS="chapter" HREF="ch05_01.html" TITLE="5. Browsing and Advanced Disk Shares ">
42 <IMG SRC="gifs/txtnexta.gif" ALT="Next: 5. Browsing and Advanced Disk Shares " BORDER="0"></a></td></tr></table>&nbsp;<hr noshade size=1></center>
43 </div>
44 <blockquote>
45 <div>
46 <H2 CLASS="sect1">
47 <A CLASS="title" NAME="ch04-29331">
48 4.8 Logging Configuration Options</a></h2><P CLASS="para">Occasionally, we need to find out what Samba is up to. This is especially true when Samba is performing an unexpected action or is not performing at all. To find out this information, we need to check Samba's log files to see exactly why it did what it did.</p><P CLASS="para">
49 Samba log files can be as brief or verbose as you like. Here is an example of what a Samba log file looks like:</p><PRE CLASS="programlisting">
50 [1999/07/21 13:23:25, 3] smbd/service.c:close_cnum(514)
51   phoenix (192.168.220.101) closed connection to service IPC$
52 [1999/07/21 13:23:25, 3] smbd/connection.c:yield_connection(40)
53   Yielding connection to IPC$
54 [1999/07/21 13:23:25, 3] smbd/process.c:process_smb(615)
55   Transaction 923 of length 49
56 [1999/07/21 13:23:25, 3] smbd/process.c:switch_message(448)
57   switch message SMBread (pid 467)
58 [1999/07/21 13:23:25, 3] lib/doscalls.c:dos_ChDir(336)
59   dos_ChDir to /home/samba
60 [1999/07/21 13:23:25, 3] smbd/reply.c:reply_read(2199)
61   read fnum=4207 num=2820 nread=2820
62 [1999/07/21 13:23:25, 3] smbd/process.c:process_smb(615)
63   Transaction 924 of length 55
64 [1999/07/21 13:23:25, 3] smbd/process.c:switch_message(448)
65   switch message SMBreadbraw (pid 467)
66 [1999/07/21 13:23:25, 3] smbd/reply.c:reply_readbraw(2053)
67   readbraw fnum=4207 start=130820 max=1276 min=0 nread=1276
68 [1999/07/21 13:23:25, 3] smbd/process.c:process_smb(615)
69   Transaction 925 of length 55
70 [1999/07/21 13:23:25, 3] smbd/process.c:switch_message(448)
71   switch message SMBreadbraw (pid 467)                          </pre><P CLASS="para">
72 Many of these options are of use only to Samba programmers. However, we will go over the meaning of some of these entries in more detail in <a href="ch09_01.html"><b>Chapter 9, <CITE CLASS="chapter">Troubleshooting Samba</cite></b></a>.</p><P CLASS="para">
73 Samba contains six options that allow users to describe how and where logging information should be written. Each of these options are global options and cannot appear inside a share definition. Here is an up-to-date configuration file that covers each of the share and logging options that we've seen so far:</p><PRE CLASS="programlisting">
74 [global]
75         netbios name = HYDRA
76         server string = Samba %v on (%I)
77         workgroup = SIMPLE
78
79         #  Networking configuration options
80         hosts allow = 192.168.220. 134.213.233. localhost
81         hosts deny = 192.168.220.102
82         interfaces = 192.168.220.100/255.255.255.0 \
83                                         134.213.233.110/255.255.255.0
84         bind interfaces only = yes
85
86         # Debug logging information
87         log level = 2
88         log file = /var/log/samba.log.%m
89         max log size = 50
90         debug timestamp = yes
91
92 [data]
93         path = /home/samba/data
94         browseable = yes
95         guest ok = yes
96         comment = Data Drive
97         volume = Sample-Data-Drive
98         writeable = yes
99         </pre><P CLASS="para">
100         Here, we've added a custom log file that reports information up to debug level 2. This is a relatively light debugging level. The logging level ranges from 1 to 10, where level 1 provides only a small amount of information and level 10 provides a plethora of low-level information. Level 2 will provide us with useful debugging information without wasting disk space on our server. In practice, you should avoid using log levels greater than 3 unless you are programming Samba.</p><P CLASS="para">
101 This file is located in the <I CLASS="filename">
102 /var/log</i> directory thanks to the <CODE CLASS="literal">
103 log</code> <CODE CLASS="literal">
104 file</code> configuration option. However, we can use variable substitution to create log files specifically for individual users or clients, such as with the <CODE CLASS="literal">
105 %m</code> variable in the following line:</p><PRE CLASS="programlisting">
106 log file = /usr/local/logs/samba.log.%m</pre><P CLASS="para">
107 Isolating the log messages can be invaluable in tracking down a network error if you know the problem is coming from a specific machine or user.</p><P CLASS="para">
108 We've added another precaution to the log files: no one log file can exceed 50 kilobytes in size, as specified by the <CODE CLASS="literal">
109 max</code> <CODE CLASS="literal">
110 log</code> <CODE CLASS="literal">
111 size</code> option. If a log file exceeds this size, the contents are moved to a file with the same name but with the suffix <EM CLASS="emphasis">
112 .old</em> appended. If the <EM CLASS="emphasis">
113 .old</em> file already exists, it is overwritten and its contents are lost. The original file is cleared, waiting to receive new logging information. This prevents the hard drive from being overwhelmed with Samba log files during the life of our daemons.</p><P CLASS="para">
114 For convenience, we have decided to leave the debug timestamp in the logs with the <CODE CLASS="literal">
115 debug</code> <CODE CLASS="literal">
116 timestamp</code> option, which is the default behavior. This will place a timestamp next to each message in the logging file. If we were not interested in this information, we could specify <CODE CLASS="literal">
117 no</code> for this option instead.</p><DIV CLASS="sect2">
118 <H3 CLASS="sect2">
119 <A CLASS="title" NAME="ch04-97929">
120 4.8.1 Using syslog</a></h3><P CLASS="para">
121 If you wish to use the system logger (<I CLASS="filename">syslog</i>) in addition to or in place of the standard Samba logging file, Samba provides options for this as well. However, to use <I CLASS="filename">
122 syslog</i>, the first thing you will have to do is make sure that Samba was built with the <CODE CLASS="literal">
123 configure</code> <CODE CLASS="literal">
124 --with-syslog</code> option. See <a href="ch02_01.html"><b>Chapter 2</b></a> for more information on configuring and compiling Samba.</p><P CLASS="para">
125 Once that is done, you will need to configure your <I CLASS="filename">
126 /etc/syslog.conf</i> to accept logging information from Samba. If there is not already a <CODE CLASS="literal">
127 daemon.*</code> entry in the <CODE CLASS="replaceable">
128 <I>
129 /etc/syslog.conf</i></code> file, add the following:</p><PRE CLASS="programlisting">
130 daemon.*        /var/log/daemon.log</pre><P CLASS="para">
131 This specifies that any logging information from system daemons will be stored in the <I CLASS="filename">
132 /var/log/daemon.log</i> file. This is where the Samba information will be stored as well. From there, you can specify the following global option in your configuration file:</p><PRE CLASS="programlisting">
133 syslog = 2</pre><P CLASS="para">
134 This specifies that any logging messages with a level of 1 will be sent to both the <I CLASS="filename">
135 syslog</i> and the Samba logging files. (The mappings to <I CLASS="filename">
136 syslog</i> priorities are described in the upcoming section "syslog.") Let's assume that we set the regular <CODE CLASS="literal">
137 log</code> <CODE CLASS="literal">
138 level</code> option above to 4. Any logging messages with a level of 2, 3, or 4 will be sent to the Samba logging files, but not to the <I CLASS="filename">
139 syslog</i>. Only level 1 logging messages will be sent to both. If the <CODE CLASS="literal">
140 syslog</code> value exceeds the <CODE CLASS="literal">
141 log</code> <CODE CLASS="literal">
142 level</code> value, nothing will be written to the <I CLASS="filename">
143 syslog</i>.</p><P CLASS="para">
144 If you want to specify that messages be sent only to <I CLASS="filename">
145 syslog</i>&nbsp;- and not to the standard Samba logging files&nbsp;- you can place this option in the configuration file:</p><PRE CLASS="programlisting">
146 syslog only = yes</pre><P CLASS="para">
147 If this is the case, any logging information above the number specified in the <CODE CLASS="literal">
148 syslog</code> option will be discarded, just like the <CODE CLASS="literal">
149 log</code> <CODE CLASS="literal">
150 level</code> option.</p></div><DIV CLASS="sect2">
151 <H3 CLASS="sect2">
152 <A CLASS="title" NAME="ch04-pgfId-961771">
153 4.8.2 Logging Configuration Options</a></h3><P CLASS="para">
154 <A CLASS="xref" HREF="ch04_08.html#ch04-92838">
155 Table 4.7</a> lists each of the logging configuration options that Samba can use. </p><br>
156 <TABLE CLASS="table" BORDER="1" CELLPADDING="3">
157 <CAPTION CLASS="table">
158 <A CLASS="title" NAME="ch04-92838">
159 Table 4.7: Global Configuration Options </a></caption><THEAD CLASS="thead">
160 <TR CLASS="row" VALIGN="TOP">
161 <TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
162 <P CLASS="para">
163 Option</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
164 <P CLASS="para">
165 Parameters</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
166 <P CLASS="para">
167 Function</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
168 <P CLASS="para">
169 Default</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
170 <P CLASS="para">
171 Scope</p></th></tr></thead><TBODY CLASS="tbody">
172 <TR CLASS="row" VALIGN="TOP">
173 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
174 <P CLASS="para">
175 <CODE CLASS="literal">
176 log file</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
177 <P CLASS="para">
178 string (fully-qualified filename)</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
179 <P CLASS="para">
180 Sets the name and location of the log file that Samba is to use. Uses standard variables.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
181 <P CLASS="para">
182 Specified in Samba makefile</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
183 <P CLASS="para">
184 Global</p></td></tr><TR CLASS="row" VALIGN="TOP">
185 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
186 <P CLASS="para">
187 <CODE CLASS="literal">
188 log level</code></p><P CLASS="para">
189 <CODE CLASS="literal">
190 (debug level)</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
191 <P CLASS="para">
192 numerical (0-10)</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
193 <P CLASS="para">
194 Sets the amount of log/debug messages that are sent to the log file. 0 is none, 3 is considerable.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
195 <P CLASS="para">
196 <CODE CLASS="literal">
197 1</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
198 <P CLASS="para">
199 Global</p></td></tr><TR CLASS="row" VALIGN="TOP">
200 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
201 <P CLASS="para">
202 <CODE CLASS="literal">
203 max log size</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
204 <P CLASS="para">
205 numerical (size in KB)</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
206 <P CLASS="para">
207 Sets the maximum size of log file. After the log exceeds this size, the file will be renamed to <EM CLASS="emphasis">
208 .bak </em>and a new log file started.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
209 <P CLASS="para">
210 <CODE CLASS="literal">
211 5000</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
212 <P CLASS="para">
213 Global</p></td></tr><TR CLASS="row" VALIGN="TOP">
214 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
215 <P CLASS="para">
216 <CODE CLASS="literal">
217 debug</code></p><P CLASS="para">
218 <CODE CLASS="literal">
219 timestamp (timestamp logs)</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
220 <P CLASS="para">
221 boolean</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
222 <P CLASS="para">
223 If no, doesn't timestamp logs, making them easier to read during heavy debugging.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
224 <P CLASS="para">
225 <CODE CLASS="literal">
226 yes</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
227 <P CLASS="para">
228 Global</p></td></tr><TR CLASS="row" VALIGN="TOP">
229 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
230 <P CLASS="para">
231 <CODE CLASS="literal">
232 syslog</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
233 <P CLASS="para">
234 numerical (0-10)</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
235 <P CLASS="para">
236 Sets level of messages sent to <EM CLASS="emphasis">
237 syslog</em>. Those levels below <CODE CLASS="literal">
238 syslog level</code> will be sent to the system logger.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
239 <P CLASS="para">
240 <CODE CLASS="literal">
241 1</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
242 <P CLASS="para">
243 Global</p></td></tr><TR CLASS="row" VALIGN="TOP">
244 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
245 <P CLASS="para">
246 <CODE CLASS="literal">
247 syslog only</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
248 <P CLASS="para">
249 boolean</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
250 <P CLASS="para">
251 If yes, uses <EM CLASS="emphasis">
252 syslog</em> entirely and sends no output to the standard Samba log files.</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
253 <P CLASS="para">
254 <CODE CLASS="literal">
255 no</code></p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
256 <P CLASS="para">
257 Global</p></td></tr></tbody></table><DIV CLASS="sect3">
258 <H4 CLASS="sect3">
259 <A CLASS="title" NAME="ch04-log-file-option">
260 4.8.2.1 log file</a></h4><P CLASS="para">
261 On our server, Samba outputs log information to text files in the <I CLASS="filename">
262 var</i> subdirectory of the Samba home directory, as set by the makefile during the build. The <CODE CLASS="literal">
263 log</code> <CODE CLASS="literal">
264 file</code> option can be used to reset the name of the log file to another location. For example, to reset the name and location of the Samba log file to <I CLASS="filename">
265 /usr/local/logs/samba.log</i>, you could use the following:</p><PRE CLASS="programlisting">
266 [global]
267         log file = /usr/local/logs/samba.log</pre><P CLASS="para">
268 You may use variable substitution to create log files specifically for individual users or clients.</p><P CLASS="para">
269 You can override the default log file location using the <CODE CLASS="literal">
270 -l</code> command-line switch when either daemon is started. However, this does not override the <CODE CLASS="literal">
271 log</code> <CODE CLASS="literal">
272 file</code> option. If you do specify this parameter, initial logging information will be sent to the file specified after <CODE CLASS="literal">
273 -l</code> (or the default specified in the Samba makefile) until the daemons have processed the <I CLASS="filename">
274 smb.conf</i> file and know to redirect it to a new log file.</p></div><DIV CLASS="sect3">
275 <H4 CLASS="sect3">
276 <A CLASS="title" NAME="ch04-pgfId-953284">
277 4.8.2.2 log level</a></h4><P CLASS="para">
278 The <CODE CLASS="literal">
279 log</code> <CODE CLASS="literal">
280 level</code> option sets the amount of data to be logged. Normally this is left at 0 or 1. However, if you have a specific problem you may want to set it at 3, which provides the most useful debugging information you would need to track down a problem. Levels above 3 provide information that's primarily for the developers to use for chasing internal bugs, and slows down the server considerably. Therefore, we recommend that you avoid setting this option to anything above 3. </p><PRE CLASS="programlisting">
281 [global]
282 log file = /usr/local/logs/samba.log.%m
283 log level = 3</pre></div><DIV CLASS="sect3">
284 <H4 CLASS="sect3">
285 <A CLASS="title" NAME="ch04-pgfId-960212">
286 4.8.2.3 max log size</a></h4><P CLASS="para">
287 The <CODE CLASS="literal">
288 max</code> <CODE CLASS="literal">
289 log</code> <CODE CLASS="literal">
290 size</code> option sets the maximum size, in kilobytes, of the debugging log file that Samba keeps. When the log file exceeds this size, the current log file is renamed to add an <EM CLASS="emphasis">
291 .old</em> extension (erasing any previous file with that name) and a new debugging log file is started with the original name. For example:</p><PRE CLASS="programlisting">
292 [global]
293 log file = /usr/local/logs/samba.log.%m
294 max log size = 1000</pre><P CLASS="para">
295 Here, if the size of any log file exceeds one megabyte in size, Samba renames the log file <EM CLASS="emphasis">
296 samba.log. </em><CODE CLASS="replaceable">
297 <I>
298 machine-name</i></code><EM CLASS="emphasis">
299 .old</em> and a new log file is generated. If there was a file there previously with the <EM CLASS="emphasis">
300 .old</em> extension, Samba deletes it. We highly recommend setting this option in your configuration files because debug logging (even at lower levels) can covertly eat away at your available disk space. Using this option protects unwary administrators from suddenly discovering that most of their disk space has been swallowed up by a single Samba log file.</p></div><DIV CLASS="sect3">
301 <H4 CLASS="sect3">
302 <A CLASS="title" NAME="ch04-pgfId-953294">
303 4.8.2.4 debug timestamp or timestamp logs</a></h4><P CLASS="para">
304 If you happen to be debugging a network problem and you find that the date-stamp and timestamp information within the Samba log lines gets in the way, you can turn it off by giving either the <CODE CLASS="literal">
305 timestamp</code> <CODE CLASS="literal">
306 logs</code> or the <CODE CLASS="literal">
307 debug</code> <CODE CLASS="literal">
308 timestamp</code> option (they're synonymous) a value of <CODE CLASS="literal">
309 no</code>. For example, a regular Samba log file presents its output in the following form:</p><PRE CLASS="programlisting">
310 12/31/98 12:03:34 hydra (192.168.220.101) connect to server network as user davecb</pre><P CLASS="para">
311 With a <CODE CLASS="literal">
312 no</code> value for this option, the output would appear without the datestamp or  the timestamp:</p><PRE CLASS="programlisting">
313 hydra (192.168.220.101) connect to server network as user davecb</pre></div><DIV CLASS="sect3">
314 <H4 CLASS="sect3">
315 <A CLASS="title" NAME="ch04-78696">
316 4.8.2.5 syslog</a></h4><P CLASS="para">The <CODE CLASS="literal">
317 syslog</code> option causes Samba log messages to be sent to the Unix system logger. The type of log information to be sent is specified as the parameter for this argument. Like the <CODE CLASS="literal">
318 log</code> <CODE CLASS="literal">
319 level</code> option, it can be a number from 0 to 10. Logging information with a level less than the number specified will be sent to the system logger. However, debug logs equal to or above the <CODE CLASS="literal">
320 syslog</code> level, but less than log level, will still be sent to the standard Samba log files. To get around this, use the <CODE CLASS="literal">
321 syslog</code> <CODE CLASS="literal">
322 only</code> option. For example:</p><PRE CLASS="programlisting">
323 [global]
324         log level = 3
325         syslog = 1</pre><P CLASS="para">
326 With this, all logging information with a level of 0 would be sent to the standard Samba logs and the system logger, while information with levels 1, 2, and 3 would be sent only to the standard Samba logs. Levels above 3 are not logged at all. Note that all messages sent to the system logger are mapped to a priority level that the <EM CLASS="emphasis">
327 syslog</em> process understands, as shown in <A CLASS="xref" HREF="ch04_08.html#ch04-80576">
328 Table 4.8</a>. The default level is 1.    </p><br>
329 <TABLE CLASS="table" BORDER="1" CELLPADDING="3">
330 <CAPTION CLASS="table">
331 <A CLASS="title" NAME="ch04-80576">
332 Table 4.8: Syslog Priority Conversion </a></caption><THEAD CLASS="thead">
333 <TR CLASS="row" VALIGN="TOP">
334 <TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
335 <P CLASS="para">
336 Log Level</p></th><TH CLASS="entry" ALIGN="LEFT" ROWSPAN="1" COLSPAN="1">
337 <P CLASS="para">
338 Syslog Priority</p></th></tr></thead><TBODY CLASS="tbody">
339 <TR CLASS="row" VALIGN="TOP">
340 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
341 <P CLASS="para">
342 0</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
343 <P CLASS="para">
344 <CODE CLASS="literal">
345 LOG_ERR</code></p></td></tr><TR CLASS="row" VALIGN="TOP">
346 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
347 <P CLASS="para">
348 1</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
349 <P CLASS="para">
350 <CODE CLASS="literal">
351 LOG_WARNING</code></p></td></tr><TR CLASS="row" VALIGN="TOP">
352 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
353 <P CLASS="para">
354 2</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
355 <P CLASS="para">
356 <CODE CLASS="literal">
357 LOG_NOTICE</code></p></td></tr><TR CLASS="row" VALIGN="TOP">
358 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
359 <P CLASS="para">
360 3</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
361 <P CLASS="para">
362 <CODE CLASS="literal">
363 LOG_INFO</code></p></td></tr><TR CLASS="row" VALIGN="TOP">
364 <TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
365 <P CLASS="para">
366 4 and above</p></td><TD CLASS="entry" ROWSPAN="1" COLSPAN="1">
367 <P CLASS="para">
368 <CODE CLASS="literal">
369 LOG_DEBUG</code></p></td></tr></tbody></table><P CLASS="para">
370 If you wish to use <EM CLASS="emphasis">
371 syslog</em>, you will have to run <CODE CLASS="literal">
372 configure</code> <CODE CLASS="literal">
373 --with-syslog</code> when compiling Samba, and you will need to configure your <I CLASS="filename">
374 /etc/syslog.conf</i> to suit. (See the section <A CLASS="xref" HREF="ch04_08.html#ch04-97929">
375 Section 4.8.1, Using syslog</a>, earlier in this chapter.)</p></div><DIV CLASS="sect3">
376 <H4 CLASS="sect3">
377 <A CLASS="title" NAME="ch04-pgfId-953338">
378 4.8.2.6 syslog only</a></h4><P CLASS="para">
379 The <CODE CLASS="literal">
380 syslog</code> <CODE CLASS="literal">
381 only</code> option tells Samba not to use the regular logging files&nbsp;- the system logger only. To enable this, specify the following option in the global ection of the Samba configuration file:</p><PRE CLASS="programlisting">
382 [global]
383         syslog only = yes </pre></div></div></div></blockquote>
384 <div>
385 <center>
386 <hr noshade size=1><TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0">
387 <TR>
388 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">
389 <A CLASS="sect1" HREF="ch04_07.html" TITLE="4.7 Virtual Servers">
390 <IMG SRC="gifs/txtpreva.gif" ALT="Previous: 4.7 Virtual Servers" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
391 <A CLASS="book" HREF="index.html" TITLE="">
392 <IMG SRC="gifs/txthome.gif" ALT="" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
393 <A CLASS="chapter" HREF="ch05_01.html" TITLE="5. Browsing and Advanced Disk Shares ">
394 <IMG SRC="gifs/txtnexta.gif" ALT="Next: 5. Browsing and Advanced Disk Shares " BORDER="0"></a></td></tr><TR>
395 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">
396 4.7 Virtual Servers</td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
397 <A CLASS="index" HREF="inx.html" TITLE="Book Index">
398 <IMG SRC="gifs/index.gif" ALT="Book Index" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
399 5. Browsing and Advanced Disk Shares </td></tr></table><hr noshade size=1></center>
400 </div>
401
402 <!-- End of sample chapter -->
403 <CENTER>
404 <FONT SIZE="1" FACE="Verdana, Arial, Helvetica">
405 <A HREF="http://www.oreilly.com/">
406 <B>O'Reilly Home</B></A> <B> | </B>
407 <A HREF="http://www.oreilly.com/sales/bookstores">
408 <B>O'Reilly Bookstores</B></A> <B> | </B>
409 <A HREF="http://www.oreilly.com/order_new/">
410 <B>How to Order</B></A> <B> | </B>
411 <A HREF="http://www.oreilly.com/oreilly/contact.html">
412 <B>O'Reilly Contacts<BR></B></A>
413 <A HREF="http://www.oreilly.com/international/">
414 <B>International</B></A> <B> | </B>
415 <A HREF="http://www.oreilly.com/oreilly/about.html">
416 <B>About O'Reilly</B></A> <B> | </B>
417 <A HREF="http://www.oreilly.com/affiliates.html">
418 <B>Affiliated Companies</B></A><p>
419 <EM>&copy; 1999, O'Reilly &amp; Associates, Inc.</EM>
420 </FONT>
421 </CENTER>
422 </BODY>
423 </html>