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

EventBusHandler WebSocket logging #158

Open
mcweba opened this issue Aug 9, 2017 · 0 comments
Open

EventBusHandler WebSocket logging #158

mcweba opened this issue Aug 9, 2017 · 0 comments

Comments

@mcweba
Copy link
Collaborator

mcweba commented Aug 9, 2017

In the EventBusHandler class the SockJS bridge events are logged in the install method:

public void install(Router router) {
	BridgeOptions bridgeOptions = buildBridgeOptions();
	router.route(sockPath).handler(SockJSHandler.create(vertx, getSockJSHandlerOptions()).bridge(bridgeOptions, be -> {
		log.debug("SockJS bridge event: " + be.type().toString());
		if(!websocketConnectionsEnabled && BridgeEventType.SOCKET_CREATED == be.type()){
			log.info("WebSocket connections are disabled. Not allowing another connection");
			be.complete(false);
		} else {
			be.complete(true);
		}
	}));
	log.info("Installed SockJS endpoint on " + sockPath);
	log.info("Installed event bus bridge with options: " + bridgeOptionsToString(bridgeOptions));
	log.info("Installed SockJS with handler options: " + sockJSHandlerOptionsToString());
	log.info("Listening to requests on " + adressPathPattern.pattern());
	log.info("Using address prefix " + addressPrefix);
}

When the websocketConnectionsEnabled property is set to false, the logging of the SockJS bridge event should be changed for SOCKET_CREATED events. When just looking at the "SockJS bridge event" log entries, it shows a wrong picture because the sockets are not created which can be seen in the second log entry (WebSocket connections are disabled. Not allowing another connection).

@mcweba mcweba self-assigned this Aug 9, 2017
@mcweba mcweba removed their assignment Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant