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

log output clobbers data output. #35

Open
ththvseo opened this issue Feb 15, 2018 · 1 comment
Open

log output clobbers data output. #35

ththvseo opened this issue Feb 15, 2018 · 1 comment

Comments

@ththvseo
Copy link

the code in core/log.go writes log messages to stdout, which is where the tool also writes the output of queries.
when redirecting the data to a file or parsing it, it will be corrupted.

i would sugest to fix this by:
s/fmt.Printf(/fmt.Fprintf(os.Stderr, /

@nshmura
Copy link
Owner

nshmura commented Feb 17, 2018

Thank you for your reporting!

Currently, this tool dose not considered to use with redirect or pipe. And I want to fix this tool for these usage.

But now, If you want to output result of query command, please try to use --output option like this:

dsio query -f yaml --output output.yaml "SELECT * FROM Book"

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

No branches or pull requests

2 participants