using assert to replace abort() in ch_memory
add loglevl in ch_log.c '-d/--loglevel 0-7'