add experimental self-logging