drewcrawford/JucheLog — Issue #11: Multiple sequential frequent requests to loggly cause some requests to be dropped
Author: carlbrown
Created: 2012-01-17 21:23:31+00:00
State: open

In the case where you have different threads that are all trying to log to loggly at approximately the same time (in my case, I'm having CoreLocation didUpdateToLocation and CoreLocation didExitRegion happening effectively simultaneously) only one of the two will be logged. Based on "printf/NSLog debugging", it appears that the block inside dispatch_async() inside UnifiedQueue:enqueue is never getting called (or at least an NSLog statement placed as the first statement of the block never logs to the console).

Changing the wantsLogSync method of Loggly.m to return "YES" causes all the events to appear in Loggly (At the expense of blocking the UI thread).

May or may not need to be fixed (as the future direction might (I'd say should) include a mechanism where logging to a service with wantsLogSync==NO creates a persistent artifact (file or record) on the device (atomically) that is then sent to the server and cleared on a background thread) - but I wanted to make sure it got recorded.