What I mean is, I'm curious how webalizer.php parses the logs sucessfully and output correct HTML files in the stats folder in all my sites probably.
webalizer.php does not paerse these logs as I posted above. The logs where parsed and splitted by logs.php and stored in the log directory of the websites. When this is finished, webalizer.php runs the webalizer program for every splitted logfile to generate the statistics.
Have a look at the code if you want to know how the logfiles where processed in detail.