Introducing log function from @mayabrandi
Changes introduced by @mayabrandi upstream