Petrology (from the Greek πέτρα, petra, "rock" and λόγος, logos, "study") is the branch of geology that studies the origin, composition, distribution and structure of rocks.Lithology was once approximately synonymous with petrography, but in current usage, lithology focuses on macroscopic hand-sample or outcrop-scale description of rocks while petrography is the speciality that deals with microscopic details.In the petroleum industry, lithology, or more specifically mud logging, is the graphic representation of geological formations being drilled through, and drawn on a log called a mud log.