I have a script that removes all log files in cluding alog* plog* pmlog* and the logs in data/efslog/OEMDBG_LOG, /data/last_alog, and /data/last_klog. I have ran it on my phone(i put it in system bin and chmod'ed it to 755 so i can just call rmlogs from the terminal, but you can also place the script in /system/etc/init.d and it will run at boot on a kernel with init.d support)
In total it only cleared up like 15mb on my phone, but I am running a custom version of my bROM(we'll call it 1.0 1/2) and I have managed to get it to where it doesn't dump as many logs on my ROM, by changing a couple xml config files in the ROM(or at least I believe that is what did it lol!) but if you have a bunch of alog files the amount cleared will be monumental. The script deletes anything in /data starting with alog, plog and pmlog, and clears out the folders i mentioned above with the log files.
What is happening is that as certain events take place, the phone dumps logs of those events to the data partition. I believe this was used in debugging the phone and perhaps was left on by accident when the ROM was released. Most of the files never grow very large, but some of them(most notably the alog files) can grow to be very large.
Here is the link to the script. Like I said you can either put it in /system/etc/init.d and chmod it to 755 to have it run at boot(must have a kernel that supports init.d scripts) or you can place it in /system/bin and chmod the file to 755 and you can run it simply by opening a terminal and type su then rmlogs. I am including the script in my 1.1 ROM for easy cleaning of log files.
rmlogs script
If anyone needs help getting the script copied and the permissions set on it(chmod) then let me know. you must be rooted in order to run the script and to place it and chmod it. For init.d support you need a kernel that runs init.d scripts(just about every custom kernel does)
@thangfish, its more to do with the kernel, like if you run my kernel on the stock ROM, then init.d scripts can be ran, because my kernel runs init.d scripts on any ROM. pwn's kernel however requires busybox to be installed with the run-parts binary and it has to be installed to /system/bin because of the way he set his init.d support up. I'm not sure about the other kernels.
And the reason why cm7 and miui don't do this is the way their framework is set up. It's not set up to dump log files all the time. I'm sure this was a blunder by Motorola in there hurried release of this phone.