[ovs-dev] [PATCH 2/2] vlog: add "vlog/list PATTERN" command
Ansis Atteka
aatteka at nicira.com
Wed Jun 17 16:49:28 UTC 2015
On Wed, Jun 17, 2015 at 7:53 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Jun 17, 2015 at 12:53:54AM -0700, Ansis Atteka wrote:
>> While it is possible to change PATTERN (a.k.a. logging format) for
>> destinations with vlog/set command, it is currently not possible to
>> retrieve logging format from a running daemon to verify its correctness.
>>
>> This patch addresses this shortcomming by introducing "vlog/list PATTERN"
>> command. Also, this command, for example, makes it obvious to user that,
>> if one uses libc syslog() call to log messages, then libc syslog() call
>> would add extra prefix to every log message that Open vSwitch sends to
>> syslog server.
>>
>> Signed-Off-By: Ansis Atteka <aatteka at nicira.com>
>
> I'd introduce a new vlog/list-pattern command instead of overloading
> vlog/list here. (We made a mistake in overloading -v to set the
> pattern, but there is no need to compound the error.)
In the paragraph above, did you mean "overloading vlog/set to set the
pattern" instead of "overloading -v to set the pattern"? Or maybe you
intended to refer to the command line argument -vPATTERN instead?
My reasoning why I introduced pattern listing support in vlog/list
command is to have symmetry between already existing vlog/[list|set]
command structure. Here are sample commands:
ovs-appctl vlog/set ::DBG
ovs-appctl vlog/list
ovs-appctl vlog/set PATTERN:syslog:'some_pattern_string' <--- This is
already implemented
ovs-appctl vlog/list PATTERN <---- This is what I implemented in this patch
However, if you think this looks better:
ovs-appctl vlog/set ::DBG
ovs-appctl vlog/list
ovs-appctl vlog/set PATTERN:syslog:'some_pattern_string'
ovs-appctl vlog/list-pattern
Then I can change it. However, in the second example we should
consider to change vlog/set to vlog/set-pattern as well to maintain
symmetry.
More information about the dev
mailing list