fix: uninitialized var

used -Wall to find
warning: 'dd' is used uninitialized in this function [-Wuninitialized]
fix: warning move var logtxt[] from log.h to log.c

used -Wall for find warning: 'logtxt' defined but not used [-Wunused-variable]
logtxt should only exist in log.c
every other include of log.h introduce another
logtxt which waste space