It appears that failover may happen whenever the application is unable to connect to a database, not only when the database completely fails.
Whether a query is performed on the primary or secondary database is not logged by the Gateway, so the information is not available in ssg.log. If you would like to see a log when an entry is made to db2, it would make sense to configure MySQL to log that information on that node.