Logs visible on iOS5 are not visible on iOS 6 (only on the device)

I use the asl framework to register various levels of errors, and then display them using the method. I have a very strange error: the method that I use to display logs of all levels works on iOS 5, but on iOS 6 it returns me only logs with a warning level.

-(NSArray*) retrieveLogsWithLevel:(LoggingLevels)level_in forQueryOperation:(QueryOperations)queryOperation { [self.accessLock lock]; // subscribe for low memory notifications [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lowMemoryNotificationReceived:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; // build the query aslmsg aslQuery = asl_new(ASL_TYPE_QUERY); const int setQueryStatus1 = asl_set_query(aslQuery, ASL_KEY_SENDER, [self usedByAppName], ASL_QUERY_OP_EQUAL); if( (setQueryStatus1 != 0) /*|| (setQueryStatus2 != 0)*/ ) { return [NSArray array]; } // convert enum to string representation char buff[2]; sprintf(buff, "%d", level_in); asl_set_query(aslQuery, ASL_KEY_LEVEL, buff/*"4"*/, queryOperation | ASL_QUERY_OP_NUMERIC); // execute query aslresponse response = asl_search(NULL, aslQuery); asl_free( aslQuery ); NSArray* results = [self extractResults:response]; // free the response aslresponse_free(response); // unsubscribe from low memory notifications [[NSNotificationCenter defaultCenter] removeObserver:self]; [self.accessLock unlock]; return results; } 

I tried the same code on the simulator and it returns all the records. Only on a device running iOS6 does this fail.

+4
source share

All Articles