AFNetworking/AFHTTPRequestOperationLogger — pull request #9 by 0xced (2012-11-08 08:46:09+00:00)
Title: Add shouldLogOperation block property

This new property gives more control over what is logged. If, for example, you want to keep only responses and filter out requests logs and operations that were cancelled, you could use it this way:

logger.shouldLogOperation = ^BOOL (AFHTTPRequestOperation *operation) {
BOOL isFinished = [[operation valueForKey:@"state"] intValue] == 3; // AFOperationFinishedState
BOOL isCancelled = [operation.error.domain isEqualToString:NSURLErrorDomain] && operation.error.code == NSURLErrorCancelled;
return isFinished && !isCancelled;
};