How to get detailed logs in gazebo+jmavsim for simulated flight

Hi,
I’m using ubuntu18.04 to build the px4 code for gazebo and jmavsim. I’m stuck with the following issues:

How to get detailed logs in gazebo+jmavsim for simulated flights.
How to do diagnostic logging.
How to get detailed logs in QGround control+real drone flight.

Thank you.