modify the log method , set default log type if not mentiond