hi, I made this little proggie to parse upload.log and download.log and write some CSV files with the info.
If you want to take a look, it's here:
http://sf.net/projects/dcpplv
before you say it, it has a bug with kB
dC++Lv
Moderator: Moderators
mmm....
It didn't report any user, just that dummy line "users found:"?
Maybe it's a log format problem. This is the one I used (It was the default for DC++)
According to my calculations it should take less than a microsecond to find the first user, since it will be in the first line
Try saving this line:
into "Downloads.log" and run dC++Lv on it.
Maybe it's a log format problem. This is the one I used (It was the default for DC++)
Code: Select all
for downloads:
%Y-%m-%d %H:%M: %[target] downloaded from %[user], %[size] (%[chunksize]), %[speed], %[time]
for uploads:
%Y-%m-%d %H:%M: %[source] uploaded to %[user], %[size] (%[chunksize]), %[speed], %[time]
Try saving this line:
Code: Select all
2002-10-02 04:41: D:\Downloading\Edith Piaf - 20 `French' Hit Singles\Edith Piaf - 20 `French' Hit Singles - 20 - A quoi ca sert l'amour.mp3 downloaded from imp3ler, 3713573 (3713573), 2.11 kB/s, 0:28:37
Hmm, must be the old DC++ log format messing it up....
Download log
Download log
Upload logOLD: 2002-04-06 18:07: E:\My Music\DC Temp\Sublime - 40oz to Freedom\01 - Sublime - Waiting For My Ruca.mp3 downloaded from [HM]Bleach, 2288872 b, : 81.88 kB/s, 0:00:00
New: 2003-04-17 09:39: D:\Program Files\DCPlusPlus\FileLists\[RU]nzmngr.DcLst downloaded from [RU]nzmngr, 213944 (213944), 23.74 kB/s, 0:00:08
Maybe in future versions, you can have it parse older logs or just ignore older log formats and inform the user.OLD: 2002-04-07 11:08: warez\Adobe\Adobe Premiere 6.0 - Self-Extracting.exe uploaded to [HM]Obby, 71724544 b, : 10.68 kB/s, 0:00:00
New: 2003-04-10 19:14: kk hub\winamp_playlist.html uploaded to [RU]Lady_Death, 548524 (548524), 4.47 kB/s, 0:01:59
Yes, there's the problem. Starting from the end of line, this program searches for the "(" character, then the "," and finally for a space to get the size and the username.
Anyway, How old is this format?
There are two paths for implementing it:
1- short path, would take some time when running the utility.
2- long path, would take some very long time to implement, and no time when running.
But I am not sure if I want to implement it, you know...
Another path is to make a special version for old formats. Or (another one), to use search and replace for those logs, and move to the new format.
Search and replace is very easy:
Search: " b, " <- has two spaces
Replace: " (" <- has one space
I think this last 'path' is the simplest
Anyway, How old is this format?
There are two paths for implementing it:
1- short path, would take some time when running the utility.
2- long path, would take some very long time to implement, and no time when running.
But I am not sure if I want to implement it, you know...
Another path is to make a special version for old formats. Or (another one), to use search and replace for those logs, and move to the new format.
Search and replace is very easy:
Search: " b, " <- has two spaces
Replace: " (" <- has one space
I think this last 'path' is the simplest
Those old logs are from 2002-04-06.....yup, thats right, I've kept them around for over a year!
For the implementation....couldn't you just incorperate both log formats? For example, if it doesnt find the "(" , then the older log format must be in use (assuming default format is followed). Then to parse the username, you tell it to use the text between "downloaded from" / "uploaded to" and before the first comma "," which should be the username. Then it should be pretty simple to go from there enumerating the other fields recorded.
For the implementation....couldn't you just incorperate both log formats? For example, if it doesnt find the "(" , then the older log format must be in use (assuming default format is followed). Then to parse the username, you tell it to use the text between "downloaded from" / "uploaded to" and before the first comma "," which should be the username. Then it should be pretty simple to go from there enumerating the other fields recorded.
ok, ok...
Ok, I'll build a special version for you
I don't think much people use that old format, but what I'll do is put a warning if the program can't find a thing in the first line. I will put the log format I got in mind when making the program, and encourage everyone to switch to it
You will find that special build in the same download page of the project with some distinctive name like "Old Log Format" or "BSOD2600 very special version"
It's not that I don't want to implement that different format into the program. The problem is NSIS, that is designed to build installers, not entire programs. So its possibilities are very very limited when it comes to programing. Why did I use that? Because I am not a real programmer, and NSIS is easy, cute and does the job. What amazes me the most is the tiny size of the executable.
I don't think much people use that old format, but what I'll do is put a warning if the program can't find a thing in the first line. I will put the log format I got in mind when making the program, and encourage everyone to switch to it
You will find that special build in the same download page of the project with some distinctive name like "Old Log Format" or "BSOD2600 very special version"
It's not that I don't want to implement that different format into the program. The problem is NSIS, that is designed to build installers, not entire programs. So its possibilities are very very limited when it comes to programing. Why did I use that? Because I am not a real programmer, and NSIS is easy, cute and does the job. What amazes me the most is the tiny size of the executable.