The brief
The A4 was leaking engine oil, a film building up under the engine and the level dropping between checks, and the oil level reading on the dash had gone unreliable too. He brought it in, which is the right call, an oil leak only spreads and an engine low on oil is an engine at risk. The trail pointed at the oil sump, the pan at the bottom of the engine that holds the oil, and the oil level sensor that sits low in the sump and reports the level. The sump seals to the block with a gasket or sealant bead, and over the years the heat cycles harden it so it lets go and oil weeps out the join; the level sensor, sitting down in the oil, can fail too and report wrong. So with the sump coming off anyway to reseal it, the sensor gets done at the same time.
The diagnosis
With the engine cleaned off and run, the leak traced to the sump gasket, oil weeping from the seam between the pan and the block, and the oil level sensor was reading erratically, confirmed faulty. The rest of the engine's seals checked out dry, so it was the sump gasket and the sensor. That's a reseal of the sump with a fresh seal, and a new oil level sensor while the pan's off and accessible.
The work
The undertray came off, the oil was drained, and the sump pan unbolted and removed. The faulty oil level sensor was replaced with a new genuine Audi part, both mating faces on the pan and the block were cleaned right back, the oil pickup checked clear, and the sump refitted with a fresh seal to the manufacturer's spec, every bolt torqued in sequence. Fresh oil to level, and the engine run and checked warm for any weep. A road test confirmed the sump was dry, the level held, and the oil level reading was steady and correct.
The outcome
No more oil under the engine, the sump sealed and dry, the oil level reading correctly, and the level holding between checks. The A4 went home with the leak resolved. A weeping sump gasket only worsens and a faulty level sensor leaves you guessing, so pulling the pan, resealing it properly and renewing the sensor sorted both at once.