mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-07 13:48:33 +00:00
Adds SQL queries log performed from Lua
This commit is contained in:
parent
cacbdaa9e7
commit
cd6c7c4338
6 changed files with 36 additions and 2 deletions
|
|
@ -808,6 +808,12 @@ int MySQLDB::exec_sql_query(lua_State *vm, char *sql, bool limitRows, bool wait_
|
|||
|
||||
if(m) m->lock(__FILE__, __LINE__);
|
||||
|
||||
|
||||
if(ntop->getPrefs()->is_sql_log_enabled() && log_fd && sql) {
|
||||
fprintf(log_fd, "%s\n", sql);
|
||||
fflush(log_fd);
|
||||
}
|
||||
|
||||
if((rc = mysql_query(&mysql, sql)) != 0) {
|
||||
/* retry */
|
||||
disconnectFromDB(&mysql);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue