The traditional logarithmic amplifier circuit is described in National Appnote 311:
This circuit uses the difference of two transistor currents to generate the log of the input over a pretty wide range.
The well-matched transistor pair Q1a and Q1b are halves of the LM394 "supermatch" transistor pair. But National discontinued this part last year with no clear replacement.
I can use LM3406 array, but the specs are far worse. There are plenty of arrays of '2222 or '3904 available, but there is no mention of matching in the datasheet. The transistors might be on separate dies for all I know.
TI still sells some Burr Brown log amps but they are expensive. LOG101 is $18.37 in onesies. Analog makes the AD606 for $43.88 each or the AD830x parts for $12 - $20.
How can I (cheaply) make a logarithm?