-
Notifications
You must be signed in to change notification settings - Fork 17
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
why does direct echo in processing? #31
Comments
Yes, that's just debug information. I was already thinking about removing it. Or we could could add some kind of logger to handle it. |
Feel free to create a PR for that :slightly_smiling: This would be huge improvement for the library. I wouldn't just remove the echo. To make it right is not that hard, right? My favourite would be to have logger as optional dependency passed into library. So you are free to choose what ever you want. I remember there was this PSR-3 standard. Is this still the way to go? |
In simple way, you can make a logger callback, and default choose echo in factory. $client = ClientFactory::createClient(new Version4(), $dns, function ($msg) {
echo $msg;
});
// user custom
$client = ClientFactory::createClient(new Version4(), $dns, function ($msg) {
Log::debug($msg);
}); |
no debug mode, just
echo
. You will forced wrap a ob cache to flush echo message when call it in controller.why do that? I never see a lib force run
echo
.The text was updated successfully, but these errors were encountered: