tls: include dprint.h where log functions are used

(cherry picked from commit 039f52deb384c71ecfb578e2cd648153dd9937d1)