rap2hpoutre / pg-anonymizer

Dump anonymized PostgreSQL database with a NodeJS CLI
https://raph.site
MIT License
223 stars 31 forks source link

feat: output can be stdout so you can pipe it to other commands #19

Closed imreACTmd closed 2 years ago

imreACTmd commented 2 years ago

output now accepts '-' and sends the output to stdout so you can pipe it to other commands.

imreACTmd commented 2 years ago

@rap2hpoutre what do you think of this PR?

rap2hpoutre commented 2 years ago

Thank you for your contribution!

Why did you change all console.log to console.error? It could seem weird to console.error a "process started" info.

imreACTmd commented 2 years ago

I had to switch the logging statements to STDERR because the new feature is output to STDOUT, and otherwise the log statements would end up in STDOUT and potentially mess up the resulting pg_dump output.

imreACTmd commented 2 years ago

@rap2hpoutre If you prefer me to do it differently, let me know! It's easy enough to change.

imreACTmd commented 2 years ago

@rap2hpoutre does it look good to you?

rap2hpoutre commented 2 years ago

I had to switch the logging statements to STDERR because the new feature is output to STDOUT, and otherwise the log statements would end up in STDOUT and potentially mess up the resulting pg_dump output.

That's OK then!

@rap2hpoutre does it look good to you?

Sorry for late answer! Yes we can merge it.

Thank you for your work!!!