Core issue
Messages similar to these may appear in the logs:
Sep 10 13:09:10: SPANTREETYPE: getting tree type vlan for parameter 1 value 0
Sep 10 13:09:10: stp: begin nvgen vlan 70 config blocks
Sep 10 13:09:10: stp: nvgen state 0 config blocks
Sep 10 13:09:10: stp: nvgen protocol 0 config blocks
Sep 10 13:09:10: stp: nvgen priority 70 config blocks
Sep 10 13:09:10: stp: nvgen hello 0 config blocks
Sep 10 13:09:10: stp: nvgen fwddelay 0 config blocks
Sep 10 13:09:10: stp: nvgen maxage 0 config blocks
These messages are not errors messages. They are simple debug messages. These are not related to the operation of the protocol but rather to the IOS infrastructure (SNMP queries, show commands and many other factors can lead this debug to print something on the console). These dubugs can also consume some resources.
Resolution
In order to stop these messages, use the no debug spanning-tree all command in order to disable the debugging output.