Nick Stenning avatar Nick Stenning committed 918d8a4

Don't use global logger!

Comments (0)

Files changed (1)

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.