Writing a log format file ------------------------- The first thing to do is try your logs with each of the existing format files in the formats/ dir. If any of them work even partly, that'll save you some work. bitchx.lrx is the most likely one. The next thing is to take a look at some of your logs. There are various things that are worth noting at once: - If each line in the log isn't time stamped, then gruftistats isn't going to like it. It may work, but you'll get meaningless crap in the time of day stuff. Look for an option in the program making the logs to enable time stamps. - There should be a date stamp at the start of the log, and at the turning of each day. This is definitely not essential, but without the per day usage will be boring :-). Gather a sample of lines from the log showing each of the following: normal text, actions (/me), kicks, joins, parts, quits, nick changes, topic sets, mode changes, and the data stamp. Now, what you need to write is a .lrx file. This will contain 1 line specifying the format of each of the above line types. The format of each line is: =,,,... Yes, it uses regular expressions. Yes, you might need to know regexps to do this. There are tutorials on the web; also some systems will discuss them in man egrep or man re_format. gruftistats has some build in stuff to make life easier: [[:nick:]] matches any character that's legal in a nickname [[:uh:]] matches any character that's legal in a user@host How it works is this: gruftistats tries to match each line in the log to each regexp in the .lrx. If the line matches none, it's ignored. (Use the -vvv for debugging, to see failed lines). If a line matches, gruftistats needs to which parts of the line are the nickname, the text, the time etc. That's where the name_part's some in. In the regexp, each variable part like the nickname and the text is bracketed. The name_part's correspond to the bracketed parts, and tell gruftistats what that part is. Example: text=^\[([0-9:]*)\] <([[:nick:]]*)> (.*)$,time,nick,string This says that normal text lines come in 3 parts in my log: a time (a string of digits and :'s) enclosed by []'s; a nickname enclosed by <>'s, and the rest of the string is the text typed. note that there are 3 pairs of ()'s on the left, one each for time, nick, text, and these are named as such by the ",time,nick,string" at the end. Well that's about all I have to say. If this is all too much, just post some examples of your logs to the gruftistats bug tracking system, and wait for us to add a .lrx for you :-).