Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议:添加静默执行命令的参数 #13

Open
eallion opened this issue Feb 24, 2022 · 2 comments
Open

建议:添加静默执行命令的参数 #13

eallion opened this issue Feb 24, 2022 · 2 comments

Comments

@eallion
Copy link

eallion commented Feb 24, 2022

建议添加静默执行命令的参数,如:-q,不输出执行过程。

@liuxingjun
Copy link

可以使用重定向 来屏蔽普通日志,仅保留错误输出

$ 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

@hcconquer
Copy link

hcconquer commented Aug 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants