Keeping a food diary is helpful as long as you keep good notes and analyze it appropriately. I've kept a food diary for over a year (yes, documenting everything I eat and drink and when - and also documenting when pain or nausea occurs).
Through close analysis, I now have some idea of which foods cause which symptoms, but it's not an exact science. For example, I've found that dairy in the form of milk and certain cheeses causes gas; yogurt causes pain; solid chocolate causes pain, but chocolate made into chocolate milk does not cause any symptoms- which is weird because milk alone normally causes gas. Also, I can sometimes tolerate raw lettuce, but can't at other times - I have yet to figure out why.