Permalink
Browse files

Added more logging.

  • Loading branch information...
1 parent 4fef3ba commit 5dd1be9ecd0b2bc9de3372893723621fe57c275f Eli Stevens committed Nov 10, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 couchable/core.py
View
@@ -23,6 +23,8 @@
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
+print __name__
+
"""
foo
@@ -227,6 +229,7 @@ def __init__(self, url=None, name=None, db=None):
try:
db = self.server[self.name]
except:
+ log.warn("Creating DB: {}".format(self.url))
db = self.server.create(self.name)
self.db = db
@@ -344,6 +347,8 @@ def store(self, what, skip=None):
@rtype: str or list
@return: The C{._id} of the C{what} parameter, or the list of such IDs if C{what} was a list.
"""
+ log.info('CouchableDb.store(what={!r}, skip={!r})'.format(what, skip))
+
if skip is None:
self._skip_list = []
else:
@@ -1075,6 +1080,8 @@ def load(self, what, loaded=None):
@rtype: obj or list
@return: The object indicated by the C{what} parameter, or a list of such objects if C{what} was a list.
"""
+ log.info('CouchableDb.load(what={!r}, loaded={!r})'.format(what, loaded))
+
id_list = []
if isinstance(loaded, list):

0 comments on commit 5dd1be9

Please sign in to comment.