## To enable at runtime, use SET GLOBAL statement to set the respective variable e.g. for query log
MariaDB [(none)]> SET GLOBAL general_log='ON';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> SET GLOBAL general_log_file='/var/log/mariadb/mariadb-error.log';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show variables like 'general_log%';
+------------------+----------------------------------+
| Variable_name | Value |
+------------------+----------------------------------+
| general_log | ON |
| general_log_file | /var/log/mariadb/mysql-query.log |
+------------------+----------------------------------+
2 rows in set (0.00 sec)