mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-08 18:22:26 +00:00
Add some 'is_category_enabled' before some more core logging function calls
This commit is contained in:
parent
8aa8982b66
commit
4b08c75527
@ -110,6 +110,7 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
|||||||
|
|
||||||
/* Implement Logging at the Root */
|
/* Implement Logging at the Root */
|
||||||
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
|
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
|
||||||
|
if (Log.log_settings[Logs::MySQLError].is_category_enabled == 1)
|
||||||
Log.Out(Logs::General, Logs::MySQLError, "%i: %s \n %s", mysql_errno(&mysql), mysql_error(&mysql), query);
|
Log.Out(Logs::General, Logs::MySQLError, "%i: %s \n %s", mysql_errno(&mysql), mysql_error(&mysql), query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,6 +127,7 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
|||||||
|
|
||||||
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
||||||
|
|
||||||
|
if (Log.log_settings[Logs::MySQLQuery].is_category_enabled == 1)
|
||||||
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u rows returned)", query, rowCount, requestResult.RowCount());
|
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u rows returned)", query, rowCount, requestResult.RowCount());
|
||||||
|
|
||||||
return requestResult;
|
return requestResult;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user