-
Notifications
You must be signed in to change notification settings - Fork 67
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
Missing option to disable logToFile #214
Comments
You can probably try registering a I would really rather just have an option to throw exceptions rather than trying to mangle them (poorly) in code. |
|
I ran into the same issue (also with Sentry!) - options were to leave logging on and risk accidentally logging payment info in Sentry, or disable logging entirely and potentially leave exceptions un-reported. This is what I’ve come up with #229, and the config for it: ---
Name: payment-logging
After:
- '#omnipay-logging'
---
SilverStripe\Core\Injector\Injector:
SilverStripe\Omnipay\Logger:
class: 'Psr\Log\NullLogger'
SilverStripe\Omnipay\ExceptionLogger: '%$Psr\Log\LoggerInterface' |
Im missing a option to disable
logToFile
in the abstract PaymentService class - i can see the idea when working locally, but because it logs to the silverstripe error log file, it also triggers Sentry error logging - meaning everytime a purchase is made i get 4 errors registered.My suggestion would be to wrap
$this->logToFile($output, $type);
in a if-statement to check if config allows for logging.The text was updated successfully, but these errors were encountered: