Monitoring and Troubleshooting the Server

We’ve already seen a glimpse of the configuration relating to logging of messages in the previous section. As standard, the Jabber server configuration describes two types of logging record and a recipient file for each type:

Error logging

Error log records are written to error.log in the current directory, as determined thus:

<log id='elogger'>
  <host/>
  <logtype/>
  <format>%d: [%t] (%h): %s</format>
  <file>error.log</file>
  <stderr/>
</log>

Statistical logging

Statistical log records used for tracking purposes are written to record.log in the current directory, as determined thus:

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

Log records of this type are written when a client connects to the server and when a client disconnects.

Furthermore, we can use the debugging switch (-D) when we start the server and have debugging and trace output written to STDERR.

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.