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.
In order to stop these messages, use the no debug spanning-tree allcommand in order todisable the debugging output.