The current code required than an argparse.Namespace() instance is passed in that defines a logfile attribute pointing to a file that is valid for setting up as a logging target, and unconditionally sets up logging for that file, and the stderr stream.
However if we are trying to leverage the Gatherer() from inside another project, we want to be able to manage the logging setup within that project, and not have to worry about side-effects caused by initialising the Gatherer.
With some small tweaks it should be possible to retain the same fundamental workflow when Gatherer is used by the virtual-host-gatherer CLI command, but allow other projects to include the code without an opts argument or worry about logging side-effects.
The current code required than an argparse.Namespace() instance is passed in that defines a logfile attribute pointing to a file that is valid for setting up as a logging target, and unconditionally sets up logging for that file, and the stderr stream.
However if we are trying to leverage the Gatherer() from inside another project, we want to be able to manage the logging setup within that project, and not have to worry about side-effects caused by initialising the Gatherer.
With some small tweaks it should be possible to retain the same fundamental workflow when Gatherer is used by the
virtual-host-gatherer
CLI command, but allow other projects to include the code without an opts argument or worry about logging side-effects.Will propose a candidate change soon..