Logging Definition: rlogger

Logging definition elogger is a general catchall component that serves to direct all unhandled log records to a log file, error.log. The logging definition rlogger, on the other hand, has been defined specifically to capture and store (to a file—record.log) record type log records.

Components such as c2s, s2s, and sessions write record type log records, examples of which can be seen in Example 4-14. The “login ok” messages are from the c2s component, the “dialback” messages are from the s2s component, and the “session end” message is from the sessions component.

Example 4-14. Typical record type log records

20010811T14:27:19 dj@gnu.mine.nu login ok 213.122.45.3 home
20010811T14:28:25 piers@gnu.mine.nu login ok 213.122.128.174 yeha
20010811T14:29:20 conference.jabber.org out dialback 3 208.245.212.100 gnu.mine.nu
20010811T14:29:20 update.jabber.org out dialback 3 208.245.212.100 gnu.mine.nu
20010811T14:29:20 gnu.mine.nu in dialback 16 208.245.212.100 conference.jabber.org
20010811T14:29:20 jabber.org out dialback 55 208.245.212.100 gnu.mine.nu
20010811T14:35:25 dj@gnu.mine.nu session end 486 30 57 home
20010811T14:36:39 dj@gnu.mine.nu login ok 213.122.45.3 home
20010811T14:56:50 gnu.mine.nu in dialback 2 216.109.164.2 obelisk.net

The configuration XML for rlogger is shown in Example 4-15 and is represented in diagram form in Figure 4-11.

Diagram view of rlogger
Figure 4-11. Diagram view of rlogger
Example 4-15. jabber.xml configuration for rlogger

<log id='rlogger'>
  <host/>
  <logtype>record</logtype>
  <format>%d %h %s</format>
  <file>record.log</file>
</log>

Get Programming Jabber now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.