On Wed, Jun 17, 2015 at 09:49:28AM -0700, Ansis Atteka wrote: > On Wed, Jun 17, 2015 at 7:53 AM, Ben Pfaff <b...@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 <aatt...@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?
I don't see the important distinction. vlog/set and -v call the very same vlog_set_levels_from_string() function, with only one minor difference for -v without any parameter at all. > 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. I think that the whole PATTERN:... thing was a bad design (my fault!). I think that we should retain support for it, for backward compatibility (I bet that initscripts use this), but stop documenting it and add a new vlog/set-pattern command and a new command-line option (--vlog-pattern=syslog:'some_pattern_string' is one possibility). _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev