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

Add support for --log-level option #834

Merged
merged 3 commits into from
May 22, 2019
Merged

Add support for --log-level option #834

merged 3 commits into from
May 22, 2019

Conversation

eizengan
Copy link
Contributor

@eizengan eizengan commented May 20, 2019

Without the ability to override it, --log-level info is implied when wkhtmltopdf executes. This - for some unholy reason - sends progress messages to stderr, which has the unfortunate side-effect of making WickedPdf panic dramatically over successfully completed tasks when run with raise_on_all_errors: true.

The intent of the changes herein is to ensure sensible behavior when running with log_level: 'error', raise_on_all_errors: true.

@unixmonkey
Copy link
Collaborator

Oh, that's odd. I wonder if it's the same for older versions of wkhtmltopdf?

We used to pass -q (or --quiet) on non-Windows systems by default, but that got changed at some point somewhat recently. I wonder if that fixes your issue, or causes it to ignore errors?

Would you mind checking that out and maybe adding an option for --quiet too?

@eizengan
Copy link
Contributor Author

eizengan commented May 20, 2019

@unixmonkey Ah! Very likely related. From the man page:

[-q is] maintained for backwards compatibility; Same as using --log-level none

I can add support for --quiet tomorrow if you'd like

@unixmonkey unixmonkey merged commit 6d25efd into mileszs:master May 22, 2019
@unixmonkey
Copy link
Collaborator

Thank you!

@eizengan
Copy link
Contributor Author

Happy to help. Thanks for maintaining this gem!

@unixmonkey
Copy link
Collaborator

By the way, this is now in version 1.4.0 of the gem.

@eizengan
Copy link
Contributor Author

Nice! Wasn't expecting to switch my Rails app from my fork so soon - I appreciate the quick turnaround

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 this pull request may close these issues.

2 participants