add log macro for NSError