On Fri, Sep 25, 2020 at 10:00:10PM +0200, Martin Wilck wrote:
> On Thu, 2020-09-24 at 23:34 -0500, Benjamin Marzinski wrote:
> > 
> > This causes problems with the libmpathvalid library code I
> > wrote.  The
> > issue is that right now, when you run _init_config() if
> > get_multipath_config() returns NULL, you will use the default
> > loglevel.
> > I would like the library user to have control of the log level, even
> > during the calls to _init_config().
> 
> I see. So using init_config() actually had a benefit for you already
> over load_config() :-) Such control over the verbosity would actually
> be good for multipath-tools, too.
> 
> > One possiblity would be to make init_config() take verbosity as an
> > argument.  There would also need to be some other config variable
> > that
> > gets set at the start of init_config(), which is used by
> > libmp_get_multipath_config() to check if it is initialized.
> 
> I suggest to track the verbosity independently in a different variable,
> and just set it from init_config() if it was actually set in the
> config file. Most of the time, we set it from the command line.
> This would have the additional benefit not to have to call
> get_multipath_config() in dlog().

Sure. That sounds like a much simpler solution than what I was
proposing.

-Ben

> 
> Martin
> 

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to