Logging solutions

Logging was solved using Perl by 2 contestants. Solution sizes: average 4835 bytes (shortest: 1316; longest: 8354).