The current thru a diode is close to a exponential function of the applied voltage, at least for a part of the operating range. Therefore the reverse is also true, which is that voltage is a logarithmic function of the current thru a diode.
Making a rough analog log function therefore is mostly putting a controlled current thru a diode and returning the voltage accross it. You could use a diode directly to make a exponential by driving it with voltage and measuring the current, but little errors can cause problems that way. Often the log function is used in a feedback loop instead, which has the effect of inverting it.
In days long past there were analog multipliers built on this principle. Take the log of the two input signals, add them, then unlog by doing a exponential. With a lot of careful tweaking and calibration and temperature control (or compensation), you can get meaningful results like this.
Nowadays the first reaction should be to convert the input signals to digital values as soon as possible, then do all the fancy mathematical manipulations digitally.