Subscribing to log messages in Solace Cloud
Hi Solace Community,
I was recently working on a task which required me to look at log messages using Solace Cloud. Because Solace Cloud is a managed service, I wasn't sure whether these logs were exposed to me or not and if they were, how detailed they would be. With help from my teammates, I eventually figured out how to subscribe to these logs so I decided I would write a quick post about it in case someone else is interested in them in future.
It turns out that getting access to these logs is as easy as just subscribing to a topic. Check out this incredibly helpful documentation that highlights different topics that your application can subscribe to and get log messages.
For my specific use-case, I just wanted to look at some INFO level log messages so I subscribed to: #LOG/INFO/>
. To subscribe to ALL log messages, I could have just subscribed to #LOG
and that would have given me INFO, WARNING and ERROR log messages.
Hope this was useful!
Comments
-
Thanks to @Shawn for pointing out a little mistake in my original post. To subscribe to ALL log messages, you would need to subscribe to #LOG/>
You also need to enable the events first manually. Go to your VPN settings and make sure you have the following settings set:
Additionally, you can also use the Try-Me tab on Solace Cloud to subscribe to logs as well:
3 -
So, to sum it all up, here are the steps you need to follow:
1. Go to the 'Manage' tab in your service.
2. Click on 'Message VPN' section below.
3. Go to 'settings' section.
4. Click on 'show advanced settings'
5. Enable client event messages and VPN event messages by enabling these settings as shown in the screenshot.
6. Subscribing to #LOG/>10