[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/8] golang/xenlight: Default loglevel to DEBUG until we get everything working
> The other option would be to expose the XTL logging levels and let the > caller set them somehow. I think this is fine for now. For the future, I like using the "functional option" pattern for this sort of thing. That way, if a user wanted to set a non-default log level, they could do: ctx, err := xenlight.NewContext(xenlight.WithLogLevel(lvl)) but if they do not need to specify any options, it's still just: ctx, err := xenlight.NewContext() -NR _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |