To: Dumas Walker
On Fri, 16 Feb 2024 08:58:27 -0500
"Dumas Walker" (VERT/CAPCITY2)
<VERT/CAPCITY2!
Dumas....@endofthelinebbs.com> wrote:
> Several years ago I set my BBS up to write the log to syslog.
> Recently, some shit for brains decided that having syslog was "bad"
> so now there is no easy way to just load syslog and search it.
>
> I want to revert back to having Synchronet keeps its own log. How do
> I do that?
>
> And, no I am not looking for a lecture on how this way is better.
>
> Thanks.
>
> #
>
> ---
> ■ Synchronet ■ CAPCITY2 *
capcity2.synchro.net *
> Telnet/SSH:2022/Rlogin/HTTP
FWIW
$ cat /etc/rsyslog.d/40-synchronet.conf
if $programname == 'synchronet' then {
if $msg startswith ' web ' then {
action(type="omfile" file="/var/log/sbbs/web.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' mail '
then { action(type="omfile" file="/var/log/sbbs/mail.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' srvc '
then { action(type="omfile" file="/var/log/sbbs/service.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' evnt BINK'
then { action(type="omfile" file="/var/log/sbbs/binkit.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' evnt '
then { action(type="omfile" file="/var/log/sbbs/event.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' term '
then { action(type="omfile" file="/var/log/sbbs/term.sbbs.log"
fileOwner="bbs" fileGroup="bbs") } else if $msg startswith ' ftp ' then
{ action(type="omfile" file="/var/log/sbbs/ftp.sbbs.log"
fileOwner="bbs" fileGroup="bbs") }
else
{
action(type="omfile" file="/var/log/sbbs/sbbs.log" fileOwner="bbs"
fileGroup="bbs") }
stop
}
if $programname == 'ircd' then {
action(type="omfile" file="/var/log/sbbs/ircd.log" fileOwner="bbs"
fileGroup="bbs") stop
}
I basically get a different file for each service in /var/log/sbbs
in my systemd file
#StandardOutput=syslog
#StandardError=syslog
SyslogIdentifier=synchronet
#SyslogFacility=local3
All the logging stuff is commented out except for SyslogIdentifier.
sbbs.ini contains
; Defaults to using the USER facility.
LogFacility=3
; syslog identity to use (when daemonized)
LogIdent=synchronet
Somehow, it all works.
--
End Of The Line BBS - Plano, TX
telnet
endofthelinebbs.com 23
---
■ Synchronet ■ End Of The Line BBS -
endofthelinebbs.com