This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[Solved]Logfile flags being ignored

General support and discussion of Eggdrop bots.
Post Reply
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

[Solved]Logfile flags being ignored

Post by starpossen »

I didn't want my bot to log all those joins, parts, quits etc.
so I thought that removing the j would solve this as the
conf says:

Code: Select all

##### LOG FILES #####

# Eggdrop is capable of logging various things, from channel chatter to
# commands people use on the bot and file transfers. 
# Events are logged by certain categories. This way, you can specify
# exactly what kind of events you want sent to various logfiles.
#
# Logfile flags:
#   j - joins, parts, quits, and netsplits on the channel
therefor I change mine from:

logfile jpk #lamest "logs/lamest.log"
to:
logfile pk #lamest "logs/lamest.log"

But it still logs the quits and such.

Did I miss something?
Last edited by starpossen on Fri Feb 08, 2008 11:43 pm, edited 2 times in total.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Check the log settings displayed from the output of dcc command .status all and re-check the flags that way.
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

Code: Select all

[19:07:25] <bot> Logfile #1: logs/eggdrop.log on * (mco: msgs, cmds, misc)
[19:07:25] <bot> Logfile #2: logs/mychannel.log on #mychannel (pk: public, kicks/modes)
Is what it shows in partyline for that section in questio.
I don't get it, It simply ignores to not log the j part.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Do you want it to log joins, parts, quits and netsplits? or not? :?
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

Sorry for being unclear, what I want NOT to be logged is:

Code: Select all

Joins
Parts
Quits
Netsplits
I only want it to log normal chat and kicks, normal stuff.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

no worries :) sorry for mix up.
logfile pk #lamest "logs/lamest.log"
would do it. I think you just need to cycle the current log file and then
.restart
the bot :D
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

TCL_no_TK wrote:no worries :) sorry for mix up.
logfile pk #lamest "logs/lamest.log"
would do it. I think you just need to cycle the current log file and then
.restart
the bot :D
What part of starpossen's post showing that was already done did you miss??

What version eggdrop is this issue happening on?
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

I did restart several times, and im using Windrop v1.6.18 and yes im well aware of this is not a windrop forum, however, I think I need to mention this:
http://forum.egghelp.org/viewtopic.php?t=15352

I did a conversion of a mIRC log to eggdrop log, and the mIRC had quits, and parts etc.
After the convertion where everything ran fine, thus still showing quits etc. AND using just p in logfil parameters, it still showed everything, so I guess my convertion messed up since it still keps all the reason quits etc.

Yesterday I tried with a fresh new eggdrop log, using only p
and that works as it should, only logging normal chat, but it's sad if I can't use the "big" log.

Is there a way to "clean" a log from quits, parts and all that?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

That would explain alittle, yes..
Changing logging-settings will not affect what has been logged sofar, only what will be logged in the future.

As for "cleaning" your logfiles, I'd recommend writing a simple script using pattern-matching (such as regular expressions).
If you got some tool such as grep, you could try something like this, I suppose:

Code: Select all

[user@host logs]# egrep -v '\[([0-9:]{5})\] [^ ]+ \([^ ]+\) (joined|left|got|returned) .*' logfile
The regular expression could probably be used with regexp in tcl-coding without too many issues.
NML_375
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

not an eggdrop (or windrop) problem, strictly operator probl

Post by DragnLord »

Log settings only apply to what the bot logs, not to what you put in there.
This issue is an operator problem.
You will have to "clean" the log yourself. Since you are doing this on a Windows machine, I do not know an "easy" way to remove the unwanted entries on Win32 as it can be done with sed on a UNIX-like operating system.
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

Speaking of sed, I got sed working on windows, using links in the topic I linked to in an earlier post in this topic, so if you could show or tell me what commands/parameters used in unix, maybe I could try and use it, and I would like thank you all for replying to my questions eventhough this is regarding my windrop and not my other eggs who are running under linux.

But as I asked, I would be thrilled if you could point me in the right direction regarding the sed and how to remove unwanted entries in unix.

*EDIT* I used google and found help here: http://www.grymoire.com/Unix/Sed.html
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

cat logfile.log | sed -e '/QUIT/d' -e '/JOIN/d' -e '/PART/d' > newlog.log && mv newlog.log logfile.log
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

Thanks alot for your reply, all is as I wanted it to be now.
Post Reply