mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Add sql to error log
so we can more easily grep for it.
This commit is contained in:
parent
bd116e6ad9
commit
1afb708533
@ -266,7 +266,7 @@ _add_to_db(ProfMessage *message, const char * const type, const Jid * const from
|
|||||||
message->replace_id ? message->replace_id : "",
|
message->replace_id ? message->replace_id : "",
|
||||||
type,
|
type,
|
||||||
enc) == -1) {
|
enc) == -1) {
|
||||||
log_error("log_database_add(): could not allocate memory");
|
log_error("log_database_add(): SQL query. could not allocate memory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g_free(date_fmt);
|
g_free(date_fmt);
|
||||||
@ -289,7 +289,7 @@ log_database_get_previous_chat(const gchar *const contact_barejid)
|
|||||||
char *query;
|
char *query;
|
||||||
|
|
||||||
if (asprintf(&query, "SELECT `message`, `timestamp`, `from_jid` from `ChatLogs` WHERE `from_jid` = '%s' OR `to_jid` = '%s' ORDER BY `id` ASC LIMIT 10", contact_barejid, contact_barejid) == -1) {
|
if (asprintf(&query, "SELECT `message`, `timestamp`, `from_jid` from `ChatLogs` WHERE `from_jid` = '%s' OR `to_jid` = '%s' ORDER BY `id` ASC LIMIT 10", contact_barejid, contact_barejid) == -1) {
|
||||||
log_error("log_database_get_previous_chat(): could not allocate memory");
|
log_error("log_database_get_previous_chat(): SQL query. could not allocate memory");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user