建议:添加静默执行命令的参数
eallion opened this issue · comments
Charles Chin commented
建议添加静默执行命令的参数,如:-q
,不输出执行过程。
liuxingjun commented
可以使用重定向 来屏蔽普通日志,仅保留错误输出
$ coscli sync ./test.tar cos://bucket1/example
FATA[2022-08-10 11:47:55] stat ./test.tar: no such file or directory
$ coscli sync ./test.tar cos://bucket1/example > log
$ cat log
FATA[2022-08-10 11:48:12] stat ./test.tar: no such file or directory
但是我测试错误日志依然是输出到stdout
hanchen commented
it's better to o add log config.
log:
- writer: console
level: warn
- writer: file
level: debug
filename: coscli.log
rotation_time: 24h
max_age: 7d