grep x.log -e error        

    cat -n test.log |grep "debug"   查询关键字的日志(常用!~)