Circuit to Detect State of Output Pin
The circuit below simulates nicely.

Vcc is the supply voltage for the logic family being probed, Vin goes to the node being probed, and 0V goes to ground.

The logic thresholds are set with R4, R5, and R7, and I've set them for Voh(min) = 3V and Vol(max) = 2V with a 5V supply.

The LTspice circuit list is here if you want to play with the circuit