====== Log Files ======

Synchronet's [[server:|servers]] and [[util:|utilities]] can output status to a lot of different log files that are helpful for monitoring activity and debugging issues:

The persistent files below are one part of the log story; the other is each server's **live console output** — the status messages scrolling while the BBS is running. On *nix those go through the system log; which file in ''/var/log/'' they land in depends on the configured syslog facility and your ''rsyslogd''/''syslog-ng'' setup (typically ''/var/log/syslog'' on Debian or ''/var/log/messages'' on others, by default). The repo ships an optional ''install/rsyslog.d/sbbslog.conf'' that routes Synchronet's output to a dedicated ''/var/log/sbbs.log'' when ''LogFacility=3'' is set in the ''[UNIX]'' section of ''[[config:sbbs.ini]]''. Under systemd, ''%%journalctl --follow -u <unit>%%'' is the most reliable view. See [[monitor:syslog]] for details. On Windows the destination depends on how Synchronet is being run: [[sbbsctrl]] shows messages live in its per-server panes (and can optionally persist them — see the ''TS/WS/MS/FS'' rows below); when running under [[ntsvcs|Windows NT Services]] without sbbsctrl, messages are sent to the Windows Event Log (viewable via Event Viewer). [[:monitor:mqtt|MQTT]] carries the same stream to subscribers when configured.

^ File                               ^ Purpose ^
| ''[[dir:ctrl]]/csts.tab''          | Cumulative statistics log, parsed/displayed by Synchronet and its utilities (e.g. [[util:SLOG]], [[module:slog]].js, [[sbbsctrl]]) |
| ''[[dir:data]]/error.log''         | Unexpected events that should be addressed by the sysop |
| ''[[dir:data]]/events.log''        | Event Thread activity from the [[server:Terminal]] Server |
| ''[[dir:data]]/crash.log''         | User activity before suspected crashes of [[server:Terminal]] Server nodes |
| ''[[dir:data]]/guru.log''          | User chat sessions with The Guru |
| ''[[dir:data]]/hack.log''          | Suspected hack attempts |
| ''[[dir:data]]/hungup.log''        | Users that disconnected while executing an external program on the [[server:Terminal]] Server |
| ''[[dir:data]]/logon.lst''         | Legacy list of terminal server user logons, preformatted |
| ''[[dir:data]]/logon.jsonl''       | List of terminal server user logons, used by [[module:logonlist]] module |
| ''[[dir:data]]/sbbsecho.log''      | [[util:SBBSecho]] (FidoNet EchoMail program) activity |
| ''[[dir:data]]/sendmail.log''      | Email sending activity from the [[module:sendmail]] module |
| ''[[dir:data]]/spam.log''          | Suspected SPAM delivery attempts to the [[server:Mail]] Server |
| ''[[dir:data]]/logs/http-<host>-<date>.log''   | HTTP access log from the [[server:Web]] Server, one file per virtual host per day (the actual filename is ''<HttpLogFile><vhost>-YYYY-MM-DD.log''; ''<host>'' is omitted when virtual hosts are off). The default filename prefix is ''logs/http-''; override with ''HttpLogFile'' in the ''[Web]'' section of ''[[config:sbbs.ini]]''. Access logging is enabled by default — to disable it, remove the ''HTTP_LOGGING'' flag from ''[Web] Options''. ''CustomLogFormat'' overrides the default NCSA-combined line format. |
| ''[[dir:data]]/logs/<date>.log''   | [[server:Terminal]] Server user activity |
| ''[[dir:data]]/logs/<date>.lol''   | [[server:Terminal]] Server user statistics upon log-off |
| ''[[dir:data]]/logs/FS<date>.log'' | [[server:FTP]] Server activity from [[sbbsctrl]], optional |
| ''[[dir:data]]/logs/MS<date>.log'' | [[server:Mail]] Server activity from [[sbbsctrl]], optional |
| ''[[dir:data]]/logs/TS<date>.log'' | [[server:Terminal]] Server activity from [[sbbsctrl]], optional (as of v3.22a) |
| ''[[dir:data]]/logs/WS<date>.log'' | [[server:Web]] Server activity from [[sbbsctrl]], optional (as of v3.22a) |

The ''*.log'' files without a date in their filename support automatic and configurable rotation (e.g. via [[util:SCFG]]->System->Advanced->Maximum Log File Size and [[util:echocfg]]->Global Settings->Maximum Log File Size).

===== See Also =====
  * [[:monitor:|monitor index]]
  * [[:monitor:syslog]]
  * [[:monitor:mqtt]]
  * [[:monitor:statsfiles]]

{{tag>logs monitor}}
