About Logging Location Activity
Location activity is logged to provide users a way to track which applications have accessed their location information. This topic explains which methods will cause a location activity to be logged by Event Tracing for Windows (ETW) and shown in Event Viewer.
Location activity is automatically logged per application instance. After an application that uses location starts, the first successful attempt and the first failed attempt by an instance of an application to access location information are logged. A failed attempt does not necessarily mean an error occurred; it can mean an underlying request was made for data from a location provider that has no data available. Additional successful or failed attempts by an application to use location will not be logged, unless the application is restarted.
Method calls that cause location activity to be logged on first access include those that create a location object, request location reports, and handle location report events.
In C++, calling CoCreateInstance to create an ILocation object, or calling ILocation::GetReport, IDefaultLocation::GetReport, or ILocationEvents::OnLocationChanged can result in event logging.
In script, creating the location report factory, accessing the location report property through a location report factory, or through an event handler will result in event logging.
- About Location Notifications