1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-06 03:50:08 +02:00

Add debug logging type.

This commit is contained in:
B. Petersen 2016-10-12 15:20:49 +02:00
parent 76c907e66a
commit 4a56997e0e

View file

@ -41,17 +41,15 @@
void mrlog_default_handler_(int type, const char* msg)
{
const char* type_str;
char* log_entry_str;
switch( type ) {
case 'd': type_str = "[Debug]"; break;
case 'i': type_str = ""; break;
case 'w': type_str = "[Warning]"; break;
default: type_str = "[ERROR]"; break;
}
log_entry_str = sqlite3_mprintf("%s[%s]", type_str, msg); if( log_entry_str == NULL ) { exit(18); }
printf("%s\n", log_entry_str);
sqlite3_free(log_entry_str);
printf("%s[%s]\n", type_str, msg);
}