Skip to content

Commit

Permalink
Make the logging message more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Hallman committed Mar 4, 2015
1 parent de57e01 commit dd0ada7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pykurento/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@

class MediaObject(object):
def __init__(self, parent, **args):
logger.debug("Creating new %s", self.__class__.__name__)
self.parent = parent
self.options = args
self.id = args['id'] if 'id' in args else self.get_transport().create(self.__class__.__name__, **args)

if 'id' in args:
logger.debug("Creating existing %s with id=%s", self.__class__.__name__, args['id'])
self.id = args['id']
else:
logger.debug("Creating new %s", self.__class__.__name__)
self.id = self.get_transport().create(self.__class__.__name__, **args)

def get_transport(self):
return self.parent.get_transport()

Expand Down

0 comments on commit dd0ada7

Please sign in to comment.