mirror of
https://github.com/openvswitch/ovs
synced 2025-08-27 20:37:42 +00:00
The Open vSwitch daemons written in C support user-configured logging patterns as described in ovs-appctl(8). This commit adds this capability to the daemons written in Python. - Add a '__log_patterns' attribute to the Vlog class - Populate this using the default patterns in ovs-appctl(8) - Add a '__start_time' attribute to the Vlog class to support '%r' - Update the '_log' method to build the log message according to the pattern - Add a 'set_pattern' method to allow the default patterns to be changed - Update 'set_levels_from_string' to support setting the pattern from a string Signed-off-by: Dave Tucker <dave@dtucker.co.uk> Signed-off-by: Ben Pfaff <blp@nicira.com>