add cpp support in tlog.h