logError() is made parameterised.