Converted to use angular logging so that debug messages can be easily
filtered.