Commits

Nick Stenning committed 918d8a4

Don't use global logger!

  • Participants
  • Parent commits 30e8ba7

Comments (0)

Files changed (1)

File wdmmg/lib/tasks.py

 from wdmmg.lib.csvimport import load_dataset as csv_load_dataset
 from wdmmg.lib.cubes import Cube
 
+log = logging.getLogger(__name__)
 
 @task
 def load_dataset(resource_url, model, **kwargs):
     Raises: :exc:`pymongo.errors.OperationFailure` if the dataset does
     not exist.
     '''
-    logging.debug("Compute distincts collection for dataset: %s"
+    log.debug("Compute distincts collection for dataset: %s"
                   % dataset_name)
     aggregator.update_distincts(dataset_name)
 
 def remove_entries(dataset_name):
     # NB: does not record changesets
     from wdmmg.model import Entry
-    logging.info("Deleting all entries in dataset: %s" % dataset_name)
+    log.info("Deleting all entries in dataset: %s" % dataset_name)
     errors = Entry.c.remove({"dataset.name": dataset_name})
-    logging.info("Errors: %s" % errors)
+    log.info("Errors: %s" % errors)