SQLAdvisor icon indicating copy to clipboard operation
SQLAdvisor copied to clipboard

命令返回结果抓取不了?

Open wjf870128 opened this issue 7 years ago • 3 comments

    请问sqladvisor是不是写死输出到console了?为什么我重定向的时候没有日志输出。类似

sqladvisor -h xx -u xx -p xx -P 3306 -d xx -q "xx" > log。发现直接就能展示结果出来,但是log中并没有结果。

wjf870128 avatar Mar 22 '17 09:03 wjf870128

SQLAdvisor 输出到 stderr , sqladvisor -h xx -u xx -p xx -P 3306 -d xx -q "xx" 2> log

tsthght avatar Mar 22 '17 09:03 tsthght

谢谢,解决了,为什么结果输出到stderr呢~正常的不是应该是stdout吗?这样不是很好区分错误日志。

wjf870128 avatar Mar 23 '17 06:03 wjf870128

目前使用了MySQL源码封装的日志打印函数,其内部实现是输出到stderr。后面会改掉的~

tsthght avatar Mar 23 '17 06:03 tsthght