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

How to avoid wired response message show in backend? #13

Closed
cipherchien opened this issue Mar 25, 2015 · 2 comments
Closed

How to avoid wired response message show in backend? #13

cipherchien opened this issue Mar 25, 2015 · 2 comments

Comments

@cipherchien
Copy link

Hi,

I try to develop a web chat system with ThruwayBundle, but I got a stuck situation.
When I try to publish message in backend, I got some wired response message.

screenruler-e824e513-0bd3-4ca5-846f-367f6568cc41

my backend code in Symfony:

$client = $this->container->get('thruway.client');
$client->publish("user.line.thread.55122ab298dee4fb020041b9", ['message sent from backend.']);  

My question is How to avoid that messages?

Thanks

By the way, I also check my config.yml setting. I did disable logging display.
voryx_thruway:
realm: 'myrealm'
enable_logging: false

@davidwdan
Copy link
Member

Try adding this above your backend code: Logger::set(new \Psr\Log\NullLogger());.

The enable_logging flag doesn't do anything right now.

@cipherchien
Copy link
Author

Thank you so munc and reply so quickly.
here is my code, for someone who also need it.

use Thruway\Logging\Logger;

class UserChatController extends Controller
{ 
    .......
    public function doSendMessageAction(Request $request, $threadID)
    {
    .........
                //pusher
                Logger::set(new \Psr\Log\NullLogger());
                $this->get('thruway.client')->publish("user.line.thread.55122ab298dee4fb020041b9", 
                        array('coment.submit'), 
                        array(
                            'comment'=>$comment->getBody(),
                            'when'=>time()
                        ));

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