virlog: Introduce Type{To,From}String for virLogDestination
In order to refactor the ugly virLogParseOutputs method, this is a neat way of finding out whether the destination type (in the form of a string) user provided is a valid one. As a bonus, if it turns out it is valid, we get the actual enum which will later be passed to any of virLogAddOutput methods right away.
Showing
想要评论请 注册 或 登录