How can I test for birch log in Minecraft 1.8?

/testforblock x y z minecraft:log 2

2 for facing up/down, 6 for facing east/west, 10 for facing north/south, 14 for with only bark.


Minecraft 1.13 removed the concept of data values, making commands like this much simpler:

/execute if block x y z minecraft:birch_log

(/testforblock was merged into /execute)