Relocated log-function to a separate module.