As per the MySQL documentation:
To log all the queries, you can set the value of long_query_time to 0. The default value of long_query_time is 10 seconds and min_examined_row_limit is 0.
By default, queries that do not use indexes for lookups and administrative statements (such as ALTER TABLE, ANALYZE TABLE, CHECK TABLE, CREATE INDEX, DROP INDEX, OPTIMIZE TABLE, and REPAIR TABLE) are not logged. This behavior can be changed using log_slow_admin_statements and log_queries_not_using_indexes.
To enable slow query log, you can dynamically set slow_query_log=1 and ...