adds log tracking for query analysis

adds two new tests for log and operation $not $and combination