Do you mean like a log?
Have a look at BlockLog and BlockRotatedPillar to see how they work. You'll also need to make sure you have a blockstate JSON file with properties for rotation, like acacia_log.json.
When posting code, please use PasteBin, GitHub or Gist and use syntax highlighting - it makes it much easier to read
not rotate like a Furnace with metadata rotation