change nc_log.c/h
add log level & ms in log
fix EMFILE