dsio icon indicating copy to clipboard operation
dsio copied to clipboard

log output clobbers data output.

Open ththvseo opened this issue 7 years ago • 1 comments

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, /

ththvseo avatar Feb 15 '18 17:02 ththvseo

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"

nshmura avatar Feb 17 '18 15:02 nshmura