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

Consider supporting a logErr option #59

Open
maxhallinan opened this issue Apr 12, 2017 · 3 comments
Open

Consider supporting a logErr option #59

maxhallinan opened this issue Apr 12, 2017 · 3 comments

Comments

@maxhallinan
Copy link

maxhallinan commented Apr 12, 2017

Is there any interest in adding a logErr option? logErr would be passed to loudRejection. I have a need to format error logs. The Meow way seems to be avoiding explicit catch but by doing so, I lose the ability to format the log.

@maxhallinan
Copy link
Author

@sindresorhus sorry to bug you about this. Any thoughts?

@SamVerschueren
Copy link
Contributor

I don't see any problem in using .catch in your CLI if you are in need of formatting the error.

@maxhallinan
Copy link
Author

@SamVerschueren thanks for commenting. I agree that using .catch is not problematic in the sense that it's easy to do and it works. But by using .catch, I duplicate the (simple) logic encapsulated by loud-rejection. My usage is nearly identical to the .catch example in the loud-rejection docs.

The choice was made to delegate error handling to loud-rejection. loud-rejection anticipates the need for a custom logging function. Why wouldn't meow support this option? I opened this issue in case it's an unforeseen or unrecognized use-case.

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