ajbrown / angular-loggly-logger

An AngularJS module which sends your $log message to loggly, and provides a service for manually sending messages to loggly.
MIT License
32 stars 49 forks source link

Possible Bugfix | 'msg[0] is undefined' #57

Closed Fkscorpion closed 8 years ago

Fkscorpion commented 8 years ago

Between the correctly logged errors, we also get a ton of exceptions in loggly, that say:

msg[0] is undefined

After a short look into the code, I think that this is the part where the error comes from.

The condition before only checks, if msg.stack is defined. If, for whatever reason, msg.stack is defined but msg.message is not, I guess it'll lead to the error above.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 84.663% when pulling b5192e9495a4e93fe3fd02377bc2889aa5ccff41 on Fkscorpion:fix_undefined_msg into 6a9540dad43542c272dba412fbc1de8af07b2358 on ajbrown:develop.

ajbrown commented 8 years ago

@Fkscorpion thanks!