Our code simply uses java.util.logging to log info, errors etc. I can then view these logs in multiple ways:
- cf logs command
- bluemix web console (log aggregator)
- kibana web ui
- ssh and cat /home/vcap/logs/messages.log
If I log a message, it shows up everywhere. If I log a message and pass an exception parameter, the message shows up everywhere but the exception only shows up in /home/vcap/logs/messages.log. The exception and stacktrace do not show up in cf logs, bluemix console or kibana. Since the messages.log file has a finite size and is not persisted across re-stages, I can't always look in it to get the information I need.
So how can I can ensure the full log message including the exception is being fully logged?