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

Pass Request.logger as default logger parameter #38

Closed
mxcl opened this issue Aug 30, 2021 · 3 comments
Closed

Pass Request.logger as default logger parameter #38

mxcl opened this issue Aug 30, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@mxcl
Copy link

mxcl commented Aug 30, 2021

Here https://github.com/vapor/apns/blob/main/Sources/APNS/Request%2BAPNS.swift#L30

@mxcl mxcl added the enhancement New feature or request label Aug 30, 2021
@code28
Copy link
Contributor

code28 commented Sep 16, 2021

The whole logger configuration is a bit confusing, but if I see this correctly, this is (indirectly) already achieved by this line, isn't it?
I was trying to explicitly remove the logging, but passing nil didn't work, because it took the request logger by default.

@mxcl
Copy link
Author

mxcl commented Sep 16, 2021

K cool, thanks.

IMO this is bad design from APNSwift since it makes it impossible to not log, and violates my least surprise principle but that's an upstream problem.

@code28
Copy link
Contributor

code28 commented Sep 16, 2021

K cool, thanks.

IMO this is bad design from APNSwift since it makes it impossible to not log, and violates my least surprise principle but that's an upstream problem.

I agree 100 %. It's on my list to think about it and open an PR to APNSwift. First I opened an issue to discuss. But if you want to go for it right now, it's also fine for me, because I probably won't make it until october.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants