Jonathan Swift said this quote

take a strict view of their excrements, and, from the colour, the odour, the taste, the consistence, the crudeness or maturity of digestion, form a judgment of their thoughts and designs; because men are never so serious, thoughtful, and intent, as when they are at stool...