logging.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <!-- Note: Please use the following terminology:
  7. - daemon - one process (e.g. kea-dhcp4)
  8. - component - one piece of code within a daemon (e.g. libdhcp or hooks)
  9. - server - currently equal to daemon, but the difference will be more
  10. prominent once we add client or relay support
  11. - logger - one instance of isc::log::Logger
  12. - structure - an element in config file (e.g. "Dhcp4")
  13. Do not use:
  14. - module => daemon
  15. -->
  16. <chapter id="logging">
  17. <title>Logging</title>
  18. <section>
  19. <title>Logging Configuration</title>
  20. <para>
  21. During its operation Kea may produce many messages. They differ in
  22. severity (some are more important than others) and source (some are
  23. produced by specific components, e.g. hooks). It is useful to understand
  24. which log messages are needed and which are not and configure your
  25. logging appropriately. For example, debug level messages can be safely
  26. ignored in a typical deployment. They are, however, very useful when
  27. debugging a problem.
  28. </para>
  29. <para>
  30. The logging system in Kea is configured through the
  31. <replaceable>Logging</replaceable> structure in your configuration
  32. file. All daemons (e.g. DHCPv4 and DHCPv6 servers) will use the
  33. configuration in the <replaceable>Logging</replaceable> structure to see
  34. what should be logged and to where. This allows for sharing identical
  35. logging configuration between daemons.
  36. </para>
  37. <section>
  38. <title>Loggers</title>
  39. <para>
  40. Within Kea, a message is logged through an entity
  41. called a "logger". Different parts of the code log messages
  42. through different loggers, and each logger can be configured
  43. independently of one another. For example there are different
  44. components that deal with hooks ("hooks" logger) and with
  45. DHCP engine ("dhcpsrv" logger).
  46. </para>
  47. <para>
  48. In the Logging structure in a configuration file you can
  49. specify the configuration for zero or more loggers. If there are
  50. no loggers specified, the code will use default values which
  51. cause Kea to log messages on at least INFO severity to standard
  52. output.
  53. <!-- @todo: add reference to section about controlling default
  54. behavior with env. variables, after #3591 is merged. -->
  55. </para>
  56. <para>
  57. The three most important elements of a logger configuration
  58. are the <option>name</option> (the component that is
  59. generating the messages), the <option>severity</option>
  60. (what to log), and the <option>output_options</option>
  61. (where to log).
  62. </para>
  63. <section>
  64. <title>name (string)</title>
  65. <para>
  66. Each logger in the system has a name, the name being that of the
  67. component binary file using it to log messages. For instance, if you
  68. want to configure logging for the DHCPv4 server, you add an entry
  69. for a logger named <quote>kea-dhcp4</quote>. This configuration will
  70. then be used by the loggers in the DHCPv4 server, and all the
  71. libraries used by it (unless a library defines its own logger and
  72. there is specific logger configuration that applies to that logger).
  73. </para>
  74. <para>
  75. When diagnosing the problem with the server's operation it is often
  76. desired to use the DEBUG logging level to obtain the verbose output
  77. from the server and libraries it uses. However, high verbosity may
  78. be an overkill for the logging system in cases when the server
  79. is processing high volume traffic. To mitigate this problem, Kea
  80. is using multiple loggers, which can be configured independently
  81. and which are responsible for logging messages from different
  82. functional parts of the server. If the user, trying to diagnose the
  83. problem, has a reasonably high confidence that the problem origins
  84. in a specific function of the server, or the problem is related
  85. to the specific type of operation, he may enable high verbosity
  86. only for the relevant logger, thus limiting the debug messages
  87. to the required minimum.
  88. </para>
  89. <para>
  90. The loggers are associated with a particular library or binary
  91. of Kea. However, each library or binary may (and usually does)
  92. include multiple loggers. For example, the DHCPv4 server binary
  93. contains separate loggers for: packet parsing, for dropped packets,
  94. for callouts etc. Each logger "derives" its configuration from the
  95. root logger. In the typical case, the root logger configuration
  96. is the only logging configuration specified in the configuration
  97. file. Creating a specific configuration for the selected logger,
  98. thus overriding the configuration settings specified in the
  99. root logger configuration, requires putting its configuration
  100. aside of the root logger's configuration with some of the
  101. parameters modified.
  102. </para>
  103. <para>
  104. To illustrate this, suppose you are using the DHCPv4 server
  105. with the root logger <quote>kea-dhcp4</quote> logging at the
  106. INFO level. In order to enable DEBUG verbosity for the DHCPv4
  107. packet drops, you must create configuration entry for the
  108. logger called <quote>kea-dhcp4.bad-packets</quote> and specify
  109. severity DEBUG for this logger. All other configuration
  110. parameters may be omited for this logger if the logger should
  111. use the default values specified in the root logger's
  112. configuration.
  113. </para>
  114. <!-- we don't support asterisk anymore.
  115. <para>
  116. One special case is that of a component name of <quote>*</quote>
  117. (asterisks), which is interpreted as <emphasis>any</emphasis>
  118. component. You can set global logging options by using this,
  119. including setting the logging configuration for a library
  120. that is used by multiple daemons (e.g. <quote>*.config</quote>
  121. specifies the configuration library code in whatever
  122. daemon is using it).
  123. </para> -->
  124. <para>
  125. If there are multiple logger specifications in the configuration
  126. that might match a particular logger, the specification with the
  127. more specific logger name takes precedence. For example, if there
  128. are entries for both <quote>kea-dhcp4</quote> and
  129. <quote>kea-dhcp4.dhcpsrv</quote>, the DHCPv4 server &mdash; and all
  130. libraries it uses that are not dhcpsrv &mdash; will log messages
  131. according to the configuration in the first entry
  132. (<quote>kea-dhcp4</quote>).
  133. </para>
  134. <para>
  135. Currently defined loggers are:
  136. </para>
  137. <itemizedlist>
  138. <listitem>
  139. <simpara><command>kea-dhcp4</command> - this is the root logger for
  140. the DHCPv4 server. All components used by the DHCPv4 server inherit
  141. the settings from this logger if there is no specialized logger
  142. provided.</simpara>
  143. </listitem>
  144. <listitem>
  145. <simpara><command>kea-dhcp4.bad-packets</command> - this is the
  146. logger used by the DHCPv4 server deamon for logging inbound client
  147. packets that were dropped or to which the server responded with a
  148. DHCPNAK. The allows adminstrators to configure a separate log
  149. output that contains only packet drop and reject entries.</simpara>
  150. </listitem>
  151. <listitem>
  152. <simpara><command>kea-dhcp4.callouts</command> - this logger is used
  153. to log messages pertaining to the callouts registration and execution
  154. for the particular hook point.
  155. </simpara>
  156. </listitem>
  157. <listitem>
  158. <simpara><command>kea-dhcp4.ddns</command> - this logger is used by
  159. the DHCPv4 server to log messages related to the Client FQDN and
  160. Hostname option processing. It also includes log messages
  161. related to the relevant DNS updates.</simpara>
  162. </listitem>
  163. <listitem>
  164. <simpara><command>kea-dhcp4.dhcp4</command> - this is the logger
  165. by the DHCPv4 server deamon to log basic operations.</simpara>
  166. </listitem>
  167. <listitem>
  168. <simpara><command>kea-dhcp4.dhcpsrv</command> - this is a base
  169. logger for the libdhcpsrv library.</simpara>
  170. </listitem>
  171. <listitem>
  172. <simpara><command>kea-dhcp4.hooks</command> - this logger is used
  173. to log messages related to management of hooks libraries, e.g.
  174. registration and deregistration of the libraries, and to the
  175. initialization of the callouts execution for various hook points
  176. within the DHCPv4 server.</simpara>
  177. </listitem>
  178. <listitem>
  179. <simpara><command>kea-dhcp4.hosts</command> - this logger is used
  180. within the libdhcpsrv and it logs messages related to the management
  181. of the DHCPv4 host reservations, i.e. retrieval of the resevations
  182. and adding new reservations.</simpara>
  183. </listitem>
  184. <listitem>
  185. <simpara><command>kea-dhcp4.leases</command> - this logger is used
  186. by the DHCPv4 server to log messages related to the lease allocation.
  187. The messages include detailed information about the allocated or
  188. offered leases, errors during the lease allocation etc.
  189. </simpara>
  190. </listitem>
  191. <listitem>
  192. <simpara><command>kea-dhcp4.options</command> - this logger is
  193. used by the DHCPv4 server to log messages related to processing
  194. of the options in the DHCPv4 messages, i.e. parsing options,
  195. encoding options into on-wire format and packet classification
  196. using options contained in the received packets.</simpara>
  197. </listitem>
  198. <listitem>
  199. <simpara><command>kea-dhcp4.packets</command> - this logger
  200. is mostly used to log messages related to transmission of the DHCPv4
  201. packets, i.e. packet reception and sending a response. Such messages
  202. include the information about the source and destination IP addresses
  203. and interfaces used to transmit packets. This logger is also used
  204. to log messages related to subnet selection, as this selection is
  205. usually based on the IP addresses and/or interface names, which can
  206. be retrieved from the received packet, even before the DHCPv4 message
  207. carried in the packet is parsed.
  208. </simpara>
  209. </listitem>
  210. <listitem>
  211. <simpara><command>kea-dhcp6</command> - this is the root logger for
  212. the DHCPv6 server. All components used by the DHCPv6 server inherit
  213. the settings from this logger if there is no specialized logger
  214. provided.</simpara>
  215. </listitem>
  216. <listitem>
  217. <simpara><command>kea-dhcp6.bad-packets</command> - this is the
  218. logger used by the DHCPv6 server deamon for logging inbound client
  219. packets that were dropped.</simpara>
  220. </listitem>
  221. <listitem>
  222. <simpara><command>kea-dhcp6.callouts</command> - this logger is used
  223. to log messages pertaining to the callouts registration and execution
  224. for the particular hook point.
  225. </simpara>
  226. </listitem>
  227. <listitem>
  228. <simpara><command>kea-dhcp6.ddns</command> - this logger is used by
  229. the DHCPv6 server to log messages related to the Client FQDN option
  230. processing. It also includes log messages related to the relevant
  231. DNS updates.</simpara>
  232. </listitem>
  233. <listitem>
  234. <simpara><command>kea-dhcp6.dhcp6</command> - this is the logger
  235. used DHCPv6 server deamon to log basic operations.</simpara>
  236. </listitem>
  237. <listitem>
  238. <simpara><command>kea-dhcp6.dhcpsrv</command> - this is a base
  239. logger for the libdhcpsrv library.</simpara>
  240. </listitem>
  241. <listitem>
  242. <simpara><command>kea-dhcp6.hooks</command> - this logger is used
  243. to log messages related to management of hooks libraries, e.g.
  244. registration and deregistration of the libraries, and to the
  245. initialization of the callouts execution for various hook points
  246. within the DHCPv6 server.</simpara>
  247. </listitem>
  248. <listitem>
  249. <simpara><command>kea-dhcp6.hosts</command> - this logger is used
  250. within the libdhcpsrv and it logs messages related to the management
  251. of the DHCPv6 host reservations, i.e. retrieval of the resevations
  252. and adding new reservations.</simpara>
  253. </listitem>
  254. <listitem>
  255. <simpara><command>kea-dhcp6.leases</command> - this logger is used
  256. by the DHCPv6 server to log messages related to the lease allocation.
  257. The messages include detailed information about the allocated or
  258. offered leases, errors during the lease allocation etc.
  259. </simpara>
  260. </listitem>
  261. <listitem>
  262. <simpara><command>kea-dhcp6.options</command> - this logger is
  263. used by the DHCPv6 server to log messages related to processing
  264. of the options in the DHCPv6 messages, i.e. parsing options,
  265. encoding options into on-wire format and packet classification
  266. using options contained in the received packets.</simpara>
  267. </listitem>
  268. <listitem>
  269. <simpara><command>kea-dhcp6.packets</command> - this logger
  270. is mostly used to log messages related to transmission of the DHCPv6
  271. packets, i.e. packet reception and sending a response. Such messages
  272. include the information about the source and destination IP addresses
  273. and interfaces used to transmit packets. This logger is also used
  274. to log messages related to subnet selection, as this selection is
  275. usually based on the IP addresses and/or interface names, which can
  276. be retrieved from the received packet, even before the DHCPv6 message
  277. carried in the packet is parsed.
  278. </simpara>
  279. </listitem>
  280. <listitem>
  281. <simpara><command>kea-dhcp-ddns</command> - this is the root logger for
  282. the kea-dhcp-ddns deamon. All components used by this deamon inherit
  283. the settings from this logger if there is no specialized logger
  284. provided.</simpara>
  285. </listitem>
  286. <listitem>
  287. <simpara><command>kea-dhcp-ddns.dhcpddns</command> - this is the logger
  288. used by the kea-dhcp-ddns deamon for logging configuration and global
  289. event information. This logger does not specify logging settings
  290. for libraries used by the deamon.</simpara>
  291. </listitem>
  292. <listitem>
  293. <simpara><command>kea-dhcp-ddns.dhcp-to-d2</command> - this is the logger
  294. used by the kea-dhcp-ddns deamon for logging information about events
  295. dealing with receving messages from the DHCP servers and adding them
  296. to the queue for processing.</simpara>
  297. </listitem>
  298. <listitem>
  299. <simpara><command>kea-dhcp-ddns.d2-to-dns</command> - this is the logger
  300. used by the kea-dhcp-ddns deamon for logging information about events
  301. dealing with sending and receiving messages with the DNS servers.
  302. </simpara>
  303. </listitem>
  304. </itemizedlist>
  305. <para>Additional loggers may be defined in the future. The easiest
  306. way to find out the logger name is to configure all logging to go
  307. to a single destination and look for specific logger names. See
  308. <xref linkend="logging-message-format"/> for details.</para>
  309. </section>
  310. <section>
  311. <title>severity (string)</title>
  312. <para>
  313. This specifies the category of messages logged.
  314. Each message is logged with an associated severity which
  315. may be one of the following (in descending order of
  316. severity):
  317. </para>
  318. <itemizedlist>
  319. <listitem>
  320. <simpara> FATAL </simpara>
  321. </listitem>
  322. <listitem>
  323. <simpara> ERROR </simpara>
  324. </listitem>
  325. <listitem>
  326. <simpara> WARN </simpara>
  327. </listitem>
  328. <listitem>
  329. <simpara> INFO </simpara>
  330. </listitem>
  331. <listitem>
  332. <simpara> DEBUG </simpara>
  333. </listitem>
  334. </itemizedlist>
  335. <para>
  336. When the severity of a logger is set to one of these
  337. values, it will only log messages of that severity, and
  338. the severities above it. The severity may also be set to
  339. NONE, in which case all messages from that logger are
  340. inhibited.
  341. <!-- TODO: worded wrong? If I set to INFO, why would it show DEBUG which is literally below in that list? -->
  342. </para>
  343. </section>
  344. <section>
  345. <title>output_options (list)</title>
  346. <para>
  347. Each logger can have zero or more
  348. <option>output_options</option>. These specify where log
  349. messages are sent. These are explained in detail below.
  350. </para>
  351. <para>
  352. The other options for a logger are:
  353. </para>
  354. </section>
  355. <section>
  356. <title>debuglevel (integer)</title>
  357. <para>
  358. When a logger's severity is set to DEBUG, this value
  359. specifies what debug messages should be printed. It ranges
  360. from 0 (least verbose) to 99 (most verbose).
  361. </para>
  362. <!-- TODO: complete this sentence:
  363. The general classification of debug message types is
  364. TODO; there's a ticket to determine these levels, see #1074
  365. -->
  366. <para>
  367. If severity for the logger is not DEBUG, this value is ignored.
  368. </para>
  369. </section>
  370. </section>
  371. <section>
  372. <title>Output Options</title>
  373. <para>
  374. The main settings for an output option are the
  375. <option>destination</option> and a value called
  376. <option>output</option>, the meaning of which depends on
  377. the destination that is set.
  378. </para>
  379. <section>
  380. <title>destination (string)</title>
  381. <para>
  382. The destination is the type of output. It can be one of:
  383. </para>
  384. <itemizedlist>
  385. <listitem>
  386. <simpara> console </simpara>
  387. </listitem>
  388. <listitem>
  389. <simpara> file </simpara>
  390. </listitem>
  391. <listitem>
  392. <simpara> syslog </simpara>
  393. </listitem>
  394. </itemizedlist>
  395. </section>
  396. <section>
  397. <title>output (string)</title>
  398. <para>
  399. This value determines the type of output. There are several
  400. special values allowed here: <command>stdout</command> (messages
  401. are printed on standard output), <command>stderr</command>
  402. (messages are printed on stderr), <command>syslog</command> (messages
  403. are logged to syslog using default name, <command>syslog:name</command>
  404. (messages are logged to syslog using specified name). Any other
  405. value is interpreted as a filename that the logs should be written to.
  406. </para>
  407. <para>
  408. The other options for <option>output_options</option> are:
  409. </para>
  410. <!-- configuration of flush is not supported yet.
  411. <section>
  412. <title>flush (true of false)</title>
  413. <para>
  414. Flush buffers after each log message. Doing this will
  415. reduce performance but will ensure that if the program
  416. terminates abnormally, all messages up to the point of
  417. termination are output.
  418. </para>
  419. </section> -->
  420. <section>
  421. <title>maxsize (integer)</title>
  422. <para>
  423. Only relevant when destination is file, this is maximum
  424. file size of output files in bytes. When the maximum
  425. size is reached, the file is renamed and a new file opened.
  426. (For example, a ".1" is appended to the name &mdash;
  427. if a ".1" file exists, it is renamed ".2",
  428. etc.)
  429. </para>
  430. <para>
  431. If this is 0, no maximum file size is used.
  432. </para>
  433. <note>
  434. <simpara>
  435. Due to a limitation of the underlying logging library
  436. (log4cplus), rolling over the log files (from ".1" to
  437. ".2", etc) may show odd results: There can be
  438. multiple small files at the timing of roll over. This
  439. can happen when multiple processes try to roll
  440. over the files simultaneously.
  441. Version 1.1.0 of log4cplus solved this problem, so if
  442. this or higher version of log4cplus is used to build
  443. Kea, it shouldn't happen. Even for older versions
  444. it is normally expected to happen rarely unless the log
  445. messages are produced very frequently by multiple
  446. different processes.
  447. </simpara>
  448. </note>
  449. </section>
  450. <section>
  451. <title>maxver (integer)</title>
  452. <para>
  453. Maximum number of old log files to keep around when
  454. rolling the output file. Only relevant when
  455. <option>output</option> is <quote>file</quote>.
  456. </para>
  457. </section>
  458. </section>
  459. </section>
  460. <section>
  461. <title>Example Logger Configurations</title>
  462. <para>
  463. In this example we want to set the global logging to
  464. write to the console using standard output.
  465. </para>
  466. <screen><userinput>
  467. "Logging": {
  468. "loggers": [
  469. {
  470. "name": "kea-dhcp4",
  471. "output_options": [
  472. {
  473. "output": "stdout"
  474. }
  475. ],
  476. "severity": "WARN"
  477. }
  478. ]
  479. }
  480. </userinput>
  481. </screen>
  482. <para>In this second example, we want to store debug log messages
  483. in a file that is at most 2MB and keep up to 8 copies of old logfiles.
  484. Once the logfile grows to 2MB, it will be renamed and a new file
  485. file be created.</para>
  486. <screen><userinput>
  487. "Logging": {
  488. "loggers": [
  489. {
  490. "name": "kea-dhcp6",
  491. "output_options": [
  492. {
  493. "output": "/var/log/kea-debug.log",
  494. "maxver": 8,
  495. "maxsize": 204800,
  496. "destination": "file"
  497. }
  498. ],
  499. "severity": "DEBUG",
  500. "debuglevel": 99
  501. }
  502. ]
  503. }</userinput></screen>
  504. </section>
  505. </section>
  506. <section id="logging-message-format">
  507. <title>Logging Message Format</title>
  508. <para>
  509. Each message written to the configured logging
  510. destinations comprises a number of components that identify
  511. the origin of the message and, if the message indicates
  512. a problem, information about the problem that may be
  513. useful in fixing it.
  514. </para>
  515. <para>
  516. Consider the message below logged to a file:
  517. <screen>2014-04-11 12:58:01.005 INFO [kea-dhcp4.dhcpsrv/27456]
  518. DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=4</screen>
  519. </para>
  520. <para>
  521. Note: the layout of messages written to the system logging
  522. file (syslog) may be slightly different. This message has
  523. been split across two lines here for display reasons; in the
  524. logging file, it will appear on one line.
  525. </para>
  526. <para>
  527. The log message comprises a number of components:
  528. <variablelist>
  529. <varlistentry>
  530. <term>2014-04-11 12:58:01.005</term>
  531. <!-- TODO: timestamp repeated even if using syslog? -->
  532. <listitem><para>
  533. The date and time at which the message was generated.
  534. </para></listitem>
  535. </varlistentry>
  536. <varlistentry>
  537. <term>INFO</term>
  538. <listitem><para>
  539. The severity of the message.
  540. </para></listitem>
  541. </varlistentry>
  542. <varlistentry>
  543. <term>[kea-dhcp4.dhcpsrv/27456]</term>
  544. <listitem><para>
  545. The source of the message. This comprises two elements:
  546. the Kea process generating the message (in this
  547. case, <command>kea-dhcp4</command>) and the component
  548. within the program from which the message originated
  549. (which is the name of the common library used by DHCP server
  550. implementations). The number after the slash is a process id
  551. (pid).
  552. </para></listitem>
  553. </varlistentry>
  554. <varlistentry>
  555. <term>DHCPSRV_MEMFILE_DB</term>
  556. <listitem><para>
  557. The message identification. Every message in Kea
  558. has a unique identification, which can be used as an
  559. index into the <ulink
  560. url="kea-messages.html"><citetitle>Kea Messages
  561. Manual</citetitle></ulink> (<ulink
  562. url="http://kea.isc.org/docs/kea-messages.html"
  563. />) from which more information can be obtained.
  564. </para></listitem>
  565. </varlistentry>
  566. <varlistentry>
  567. <term>opening memory file lease database: type=memfile universe=4</term>
  568. <listitem><para>
  569. A brief description.
  570. Within this text, information relating to the condition
  571. that caused the message to be logged will be included.
  572. In this example, the information is logged that the in-memory
  573. lease database backend will be used to store DHCP leases.
  574. </para></listitem>
  575. </varlistentry>
  576. </variablelist>
  577. </para>
  578. </section>
  579. <section>
  580. <title>Logging During Kea Startup</title>
  581. <para>
  582. The logging configuration is specified in the configuration file.
  583. However, when Kea starts, the file is not read until some way into the
  584. initialization process. Prior to that, the logging settings are
  585. set to default values, although it is possible to modify some
  586. aspects of the settings by means of environment variables. Note
  587. that in the absence of any logging configuration in the configuration
  588. file, the settings of (possibly modified) default configuration will
  589. persist while the program is running.
  590. </para>
  591. <para>
  592. The following environment variables can be used to control the
  593. behavio of logging during startup:
  594. </para>
  595. <variablelist>
  596. <varlistentry>
  597. <term>KEA_LOCKFILE_DIR</term>
  598. <listitem><para>
  599. Specifies a directory where the logging system should create its
  600. lock file. If not specified, it is
  601. <replaceable>prefix</replaceable>/var/run/kea, where
  602. <replaceable>prefix</replaceable> defaults to /usr/local.
  603. This variable must not end
  604. with a slash. There is one special value: "none", which
  605. instructs Kea to not create lock file at all. This may cause
  606. issues if several processes log to the same file.
  607. </para></listitem>
  608. </varlistentry>
  609. <varlistentry>
  610. <term>KEA_LOGGER_DESTINATION</term>
  611. <listitem><para>
  612. Specifies logging output. There are several special values.
  613. <variablelist>
  614. <varlistentry>
  615. <term>stdout</term>
  616. <listitem><para>
  617. Log to standard output.
  618. </para></listitem>
  619. </varlistentry>
  620. <varlistentry>
  621. <term>stderr</term>
  622. <listitem><para>
  623. Log to standard error.
  624. </para></listitem>
  625. </varlistentry>
  626. <varlistentry>
  627. <term>syslog<optional>:<replaceable>fac</replaceable></optional></term>
  628. <listitem><para>
  629. Log via syslog. The optional
  630. <replaceable>fac</replaceable> (which is
  631. separated from the word "syslog" by a colon)
  632. specifies the
  633. facility to be used for the log messages. Unless
  634. specified, messages will be logged using the
  635. facility "local0".
  636. </para></listitem>
  637. </varlistentry>
  638. </variablelist>
  639. Any other value is treated as a name
  640. of the output file. If not specified otherwise, Kea will log to
  641. standard output.
  642. </para></listitem>
  643. </varlistentry>
  644. </variablelist>
  645. </section>
  646. </chapter>