cppWAMP logging

14 views
Skip to first unread message

Rosa Lisin

unread,
Nov 3, 2015, 4:33:58 PM11/3/15
to CppWAMP
Hello Emile,
I am wondering if there is any logging available in the library. It would be useful to see WAMP traffic between the application and wamp router.

Thanks,
Rosa

Emile Cormier

unread,
Nov 3, 2015, 4:45:06 PM11/3/15
to CppWAMP
Yes, check out Session::setWarningHandler and Session::setTraceHandler. setTraceHandler will log all incoming and outgoing WAMP traffic for the Session.

Example:

    session->setTraceHandler( [](std::string text) {std::cout << "WAMP Trace: " << text << std::endl;} );

Because you can give CppWAMP a arbitrary log handler function, it can be easily integrated with any logging system your app may be using.

Rosa Lisin

unread,
Nov 4, 2015, 1:23:16 PM11/4/15
to CppWAMP
Thanks!
Reply all
Reply to author
Forward
0 new messages