Archived
1
0

Added default values to the logging function

This commit is contained in:
Jip J. Dekker 2014-06-15 20:32:24 +02:00
parent e3d6087ed4
commit 435356c321
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ def search(docopt_arguments, source_loader):
:param source_loader: An initiated SourceLoader object pointed at the directory with the sources.
"""
conf = Configurator()
conf.start_log(docopt_arguments["--log"], docopt_arguments["-v"])
conf.set_logging(docopt_arguments["--log"], docopt_arguments["-v"])
conf.set_output(docopt_arguments["--output"], docopt_arguments["--format"])
setup_crawler(docopt_arguments["<compound>"], conf.scrapy_settings, source_loader, docopt_arguments["--attributes"].split(','))
log.start(conf.scrapy_settings.get("LOG_FILE"), conf.scrapy_settings.get("LOG_LEVEL"), conf.scrapy_settings.get("LOG_STDOUT"))

View File

@ -32,7 +32,7 @@ class Configurator:
self.scrapy_settings.overrides["FEED_FORMAT"] = fileformat
def set_logging(self, logfile, verbose):
def set_logging(self, logfile=None, verbose=0):
"""
This function changes the default settings of Scapy's logging functionality
using the settings given by the CLI.