On January 29, 2015 10:14:43 AM PST, Gurucharan Shetty <[email protected]> wrote: >> >> What happens if we keep calling syslog in this situation? >If we keep calling syslog, the vlog module will keep throwing error to >stderr saying 'No handlers could be found for logger "syslog"' > >>That is, I >> can see that this is an optimization, but I don't know what prompted >it. >The background is as follows: >* I added a python unit test with the commit d69d61c7c (vlog: Ability >to override the default log facility). >* The unit test would pass on local development machine but would fail >in chroot environment (where VMware's build systems run). On >investigation, I found that chroot environment does not have access to >"/dev/log". So this commit provided a way to avoid test failure when >there is no "/dev/log" > >So far (before my commit through which a new function >add_syslog_handler() got added), python vlog handled lack of syslog >logging (along with any other issues while initializing 'file' or >'console' logging) by increasing the severity level for that >destination to "EMER". That way, it won't throw any errors for >repeated attempt at logging (unless the logging was done with the >severity level "EMER".). I think it is a clever trick. Now that I >think of it, I should probably abandon this change and follow the same >strategy to the newly added function too. > >> >> Linux uses /dev/log, what about *BSD? >"/dev/log" has been used in python vlog for more than 2 years now. >Since BSD tests have been passing, I think they work fine there.
Thanks for the explanations! Consider this acked. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
