Guacamole application logs: Show connection name instead of connection id

5/20/2020

We have a guacamole server installed in a K8s cluster and want to audit the connections.

Currenty the connection history is stored in a table in the postgres DB.

The application logs seem to have enough information for us, but we have to export the connection ID and names out of the database and match them with the logs.

https://github.com/glyptodon/guacamole-client/blob/25c87922d587f00243e7fb0b712663f336a2b8e2/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L217

The standard logger spits out a msg in the format above.

My questions is, can we override the logger message with a config to say

logger.info("User \"{}\" connected to {} ID: \"{}\", Name: \"{}\" .",
                context.self().getIdentifier(), type.NAME, id, connection_name);

instead of

logger.info("User \"{}\" connected to {} \"{}\".",
                context.self().getIdentifier(), type.NAME, id);
-- MrVentzi
guacamole
kubernetes
logging

0 Answers