[FULLY UNTESTED]: Log function.