Core log function implementation
Open, Needs TriagePublic

Description

SPM now calls printf (to stdio driver) directly, which waste code space.
In order to improve the robustness of code, remove the printf calling from SPM and implement the new core log function.