device gateway proper logging