DRY code, Logging and Generic Method