Re: Re: Conference areas...
By: Nightfox to Bill McGarrity on Thu Jun 11 2015 07:43 am
OK.. may sound stupid.. but in Sync, I'm not sure there is a log for the Events window and I just happened to be sitting at the computer when it happened.
I checked my BBS, and I don't see a log file for the events either.. Looks like Synchronet indeed doesn't keep logs of the events besides what's in
the events window. :/
Nightfox
So i know this is coming late in the game, but having dealt with this like less
than a week ago, i'll still comment now, all be it late in the game, maybe it can help someone else running sync.
So Synchronet does keep an event log, it's just inside the main bbs log itself.
Now granted, im running the linux 3.16c version, and it was originally logging everything for the bbs in /var/log/messages ...
So my thing, like i think you're talking about, was being able to have all the different event logs instead of having to sift through one log and hopefully find what you're looking for. I got the thought of, why not run it through the syslog daemon and have it break apart the logs for me.
Now i know this won't work in windows, but i'm sure there is a way to break it apart with a command or something in windows by using "FIND" in a command prompt and then outputting what you want to a different file, but if you're runnin windows, you'll have to figure that one out on your own.
Here is what I did.
Assumptions
main SBBS dir = /sbbs
#1: modified /sbbs/ctrl/sbbs.ini
-- search for the "[UNIX]" section, specifically the "Daemonize=" option and set this to "True" (without the quotes of course. Then down towards the bottom
of this file there is a "LogFacility" command for having the information output
to the syslog daemon. I set this to "LogFacility=1" which means that it will output to the "LOCAL1" syslog facility that is setup. Then I set "LogIdent=synchronet" so that way I could identify it in the syslog
#2: modified my /etc/rsyslog.conf file.
-- Now i'm running ver 5 of the rsyslogd, so i wanted to make sure that the line "$IncludeConfig /etc/rsyslog.d/*.conf" wasn't commented out so i could write out my synchronet.conf file inside of the /etc/rsyslog.d directoy. Thats all i did in this file
#3: I created the folder /sbbs/logs so i could store the logs for synchronet inside of this folder.
#4: create /etc/rsyslog.d/synchronet.conf file
-- Inside this file i have the following:
# Write everything to the /var/log/sbbs.log
:programname, contains, "synchronet" /var/log/sbbs.log
# here we break it up so we write individual logs
:msg, contains, " web " /sbbs/logs/web.log
:msg, contains, " web " ~
:msg, contains, " term " /sbbs/logs/telnet.log
:msg, contains, " term " ~
:msg, contains, " mail " /sbbs/logs/mail.log
:msg, contains, " mail " ~
:msg, contains, " srvc " /sbbs/logs/services.log
:msg, contains, " srvc " ~
:msg, contains, " ftp " /sbbs/logs/ftp.log
:msg, contains, " ftp " ~
:msg, contains, " evnt " /sbbs/logs/event.log
:msg, contains, " evnt " ~
# If it didn't fall into one of the above categories, then post here :programname, contains, "synchronet" /sbbs/logs/sbbs.log
Thats everything configured.. Simple restart your rsyslogd and everything should flow nicely. What this accomplished for me was it got rid of writing all the synchronet stuff to the /var/log/messages along with all the other linux services that write to that file. Instead of writing everything to /var/lo/messages, what it did was write everything to /var/log/sbbs.log and then for the individual services, it wrote them out, like you see above, to the
/sbbs/logs folder inside of their own files.. Then, if synchronet wanted to log
something that wasn't a part of any of the other log files it write it to it's own /sbbs/logs/sbbs.log
The duplicate line with the ~ at the end tells the rsyslogd to stop processing that message if it matches that line. rsyslogd will process each command in order that they are listed, so if it matched on the first line, then it would write it out to the log file, then on the second line, it would tell it not to process anymore for that message so it wouldn't write it any where else..
There, hope this helps... Again, in windows you can run a FIND (which is somewhat like a grep in linux) and then have a batch file that you can run as a
schedule process in windows to break apart the log file by create a batch file that will run find and output them into individual files, but since i'm not on windows, i haven't written it.. :)
Peace!
Jason
---
þ Synchronet þ The Hard Drive Cafe BBS is BACK!
telnet://bbs.hdcbbs.com