Leaf Miner damage and controlLooks like a leaf-miner of some sort...the light colored wiggly lines is what was eaten and the black is fracas...poop. Gotta see the insect itself, really to suggest how to treat. Is this plant outdoors or indoors? Please send pictures of the undersides of the leaves. Some leaf miners actually live IN the leaf. If you could turn the leaf over, look for slight bumps. Use a razor blade and carefully cut the bump to shave leaf and see if you can find insect. It'll probably look like a tiny worm...investigate while leaves are warmed from the sun and also while night. If you can't see anymore damage happening it might be because the insect has matured and flown away leaving eggs inside the leaf. Just use leaves that are new and undamaged for now.
In this article I've attached there is a paragraph on how to find the insect...if it is still possible. Putting a few leaves in a ziploc so that when larvae are matured they can't fly away. Those tiny flies WERE probably the adult leaf miners! Are these basil plants planted in garden soil or sterilized potting soil?? And the article talks about using NEEM. They said it was NATURAL. Hey 'Natural' can be VERY TOXIC. I've used NEEM and it works very well on ornamentals but I wouldn't use it on my basil!! Heck, take nicotine! Very natural, but it has got one of the most toxic LD50 (lethal dose for half the population so lower the number, higher the lethality)!! When did you first see this damage? Using garden soil in pots is a possible reason your plant got this insect. Big no-no! Always use sterilized potting soil (infused with bacteria and mycorrhizae) to plant anything in pots! Basil is an annual and does have a very short useable life. Next batch scrub those pots and use potting soil. No rocks or gravel in the bottom...actually inhibits drainage!! I am just trying to cover bases by making lots of assumptions!! Let us know what you find and send a few more pictures!!