rlp.rlim_max = RLIM_INFINITY;
setrlimit(RLIMIT_CORE, &rlp);
#endif
+ } else if (!strcasecmp(var, "debug-level")) {
+ int tmp = atoi(val);
+ if (tmp > -1 && tmp < 11) {
+ switch_core_session_ctl(SCSC_DEBUG_LEVEL, &tmp);
+ }
} else if (!strcasecmp(var, "colorize-console") && switch_true(val)) {
runtime.colorize_console = SWITCH_TRUE;
} else if (!strcasecmp(var, "mailer-app") && !zstr(val)) {
result = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &handle->env);
if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error AllocHandle\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error AllocHandle\n");
return SWITCH_ODBC_FAIL;
}
result = SQLSetEnvAttr(handle->env, SQL_ATTR_ODBC_VERSION, (void *) SQL_OV_ODBC3, 0);
if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error SetEnv\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error SetEnv\n");
SQLFreeHandle(SQL_HANDLE_ENV, handle->env);
return SWITCH_ODBC_FAIL;
}
result = SQLAllocHandle(SQL_HANDLE_DBC, handle->env, &handle->con);
if ((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error AllocHDB %d\n", result);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error AllocHDB %d\n", result);
SQLFreeHandle(SQL_HANDLE_ENV, handle->env);
return SWITCH_ODBC_FAIL;
}
}
if (handle->state == SWITCH_ODBC_STATE_CONNECTED) {
switch_odbc_handle_disconnect(handle);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Re-connecting %s\n", handle->dsn);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Re-connecting %s\n", handle->dsn);
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connecting %s\n", handle->dsn);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Connecting %s\n", handle->dsn);
if (!strstr(handle->dsn, "DRIVER")) {
result = SQLConnect(handle->con, (SQLCHAR *) handle->dsn, SQL_NTS, (SQLCHAR *) handle->username, SQL_NTS, (SQLCHAR *) handle->password, SQL_NTS);
handle->is_firebird = FALSE;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connected to [%s]\n", handle->dsn);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Connected to [%s]\n", handle->dsn);
handle->state = SWITCH_ODBC_STATE_CONNECTED;
return SWITCH_ODBC_SUCCESS;
#else