java程序没有设置标准输出和标准错误输出,可以跟踪write调用,并用printf命令打印出中文来
2>&1 strace -t -ff -e trace=write -s 2048 -p 6273 | tee -a /tmp/6273.log | sed -e '/\"\\n\"/d' -e 's/\\/\\\\/g' | while read line ; do printf "%b\n" "$line" | tee -a /tmp/6273.zh.log ; done
java程序没有设置标准输出和标准错误输出,可以跟踪write调用,并用printf命令打印出中文来
2>&1 strace -t -ff -e trace=write -s 2048 -p 6273 | tee -a /tmp/6273.log | sed -e '/\"\\n\"/d' -e 's/\\/\\\\/g' | while read line ; do printf "%b\n" "$line" | tee -a /tmp/6273.zh.log ; done