egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to convert log file names & Pisg setup

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
ndrp
Voice


Joined: 06 Jun 2013
Posts: 9

PostPosted: Mon Dec 29, 2014 10:48 am    Post subject: How to convert log file names & Pisg setup Reply with quote

1)

In Eggdrop I have used the default log format:
set logfile-suffix ".%d%b%Y"

I have about 1800 log files per channel.

Pisg does not recognize right order of log files. If I use for example 8 last log files Pisg outputs:

Code:
1839 logfile(s) found, parsing the last 8, using eggdrop format...

Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31May2013... 1 days, 89 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31May2014... 2 days, 301 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31Oct2010... 3 days, 345 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31Oct2011... 4 days, 676 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31Oct2012... 5 days, 964 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31Oct2013... 6 days, 1192 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.31Oct2014... 7 days, 1746 lines total
Analyzing log /home/myuser/eggdrop/logs/mychannel.log.yesterday... 9 days, 1888 lines total
Channel analyzed successfully in 00 hours, 00 minutes and 04 seconds on Mon Dec 29 16:20:54 2014


Pisg wants the log file name format to be
set logfile-suffix ".%Y%m%d".

How can I convert my old logfiles to right format? My scripting skills are limited.

I have used only 8 log files for testing because reading all 1800 files is slow.


Here is my pisg.cfg:
Code:
<channel="#mychannel">
   LogDir="/home/myuser/eggdrop/logs/"
   LogPrefix = "mychannel"
   NFiles="8"
   Format="eggdrop"
   Network="IRCNet"
   OutputFile="/home/myuser/public_html/stats/index.html"
   Lang = "FI"
   Maintainer="myuser"

 </channel>

#<set ColorScheme="orange_grey">
<set ShowWpl="1">
<set WordHistory="20">
<set NickTracking="1">
<set ShowMostActiveByHour="1">
<set TopicHistory="5">
<set NickHistory="10">
<set DailyActivity="31">
<set ShowWords="1">


2)
I copied all png files from /usr/share/pisg/gfx to /home/myuser/public_html/stats/. Do I need to copy css files from /usr/share/pisg/layout to somewhere?

3)
Is "logfile smjpk #mychannel "logs/mychannel.log" " enough for Pisg or do i need to add for example o flag?
Back to top
View user's profile Send private message
ndrp
Voice


Joined: 06 Jun 2013
Posts: 9

PostPosted: Mon Dec 29, 2014 12:35 pm    Post subject: Reply with quote

I got some help. I converted filenames from mychannel.log.31May2013 to mychannel.log.20130531 by this script:
Code:
#!/bin/bash
find . -type f -name '*.log.*[^0-9-]*' -print0 | while read -d '' -r logfile; do
    mv "${logfile}"  "${logfile/.log.*/.log.`date -d ${logfile#*.log.} +%Y%m%d`}"
done
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber