Skip to content

Commit

Permalink
Added more logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli Stevens committed Nov 10, 2011
1 parent 4fef3ba commit 5dd1be9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions couchable/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)

print __name__


"""
foo
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 5dd1be9

Please sign in to comment.