Add logging method.