Rework the debug configuration and add a logging method which is responsible for formatting and outputting to STDOUT when botbot is in debug mode.