added method to log a deprecation warning for the calling method