tierpod / dmarc-report-converter

Convert dmarc reports from xml to human-readable formats
MIT License
223 stars 25 forks source link

option to output logs to stderr instead of stdout #26

Closed pjagiello closed 2 years ago

pjagiello commented 2 years ago

Hi, first of all, I really like this converter, very helpful, and thank you for making it. I just wanted to suggest a small enhancement. I wanted to do the simplest thing possible, so e.g. run the converter monthly like so, and send the report to myself:

dmarc_report_converter | mailx --subject "DMARC report" postmaster@example.com

so I thought the simplest thing to do would be using these options:

output.file: "stdout"
output.format: "txt"

However, stdout also includes all of the debug logs like: "[INFO] imap: found 1 messages, 0 unseen" which I generally don't want to see when reading a report.

I think it would make sense if logs went to stderr (or at least if there was an option for that), and only the actual report would go to stdout.

Of course, I can just save the report to a file, but I think this would be a bit simpler and nice to have. Let me know what do you think.

tierpod commented 2 years ago

Hello, actually you are right, thank you. It also will be useful for external integrations via stdout + json, like

dmarc_report_converter | jq
tierpod commented 2 years ago

v0.6.3 is released with this fix