[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 3/5] virlog: Refactor virLogParseOutputs



On Wed, Mar 16, 2016 at 12:05:35PM +0100, Erik Skultety wrote:
> The problem with the original virLogParseOutputs method was that the way it
> parsed the input, walking the string char by char and using absolute jumps
> depending on the virLogDestination type, was rather complicated to read.
> This patch utilizes virStringSplit method twice, first time to filter out any
> spaces and split the input to individual log outputs and then for each
> individual output to tokenize it by to the parts according to our
> PRIORITY:DESTINATION?(:DATA) format. Also, to STREQLEN for matching destination
> was replaced with virDestinationTypeFromString call.

> Overall, the goal of this patch was to make the $(subj) method more readable,
> even though it ended up with slightly more insertions than deletions.

This sentence can be dropped.

> ---
>  po/POTFILES.in    |   1 +
>  src/util/virlog.c | 166 ++++++++++++++++++++++++++++++------------------------
>  2 files changed, 92 insertions(+), 75 deletions(-)
> 

ACK

Jan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]