diff --git a/src/config/index.ts b/src/config/index.ts index 73a77a5..e9a547f 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,8 +1,15 @@ export const resourceName = GetCurrentResourceName(); -export const mysql_debug = GetConvar('mysql_debug', 'false') === 'true'; export const mysql_ui = GetConvar('mysql_ui', 'false') === 'true'; export const mysql_slow_query_warning = GetConvarInt('mysql_slow_query_warning', 200); export const mysql_connection_string = GetConvar('mysql_connection_string', ''); +export let mysql_debug: boolean | string[]; + +try { + const debug = GetConvar('mysql_debug', 'false'); + mysql_debug = debug === 'false' ? false : JSON.parse(debug); +} catch (e) { + mysql_debug = true; +} export const mysql_transaction_isolation_level = (() => { const query = 'SET TRANSACTION ISOLATION LEVEL';