How to Log All mysql queries into log file?
[mysqld]
# Set Slow Query Log
long_query_time = 1
slow_query_log = 1
slow_query_log_file = /usr/log/slowquery.log
log_queries_not_using_indexes = 1

#Set General Log
general_log = on
general_log_file=/usr/log/general.log


Note that enabling general_log on a production server has overhead you should avoid it. You can check problematic queries from slow log.