Skip to content

Commit

Permalink
make the sql load/save message less misleading and more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha committed Mar 30, 2013
1 parent 05e6c92 commit 7ea9ff8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,14 @@ int loadOrSaveDb(sqlite3 *inmemory, const char *filename, int is_save) {

sqlite3_close(file);

if (rc == SQLITE_OK)
redisLog(REDIS_NOTICE,"SQL DB saved on disk");
else
redisLog(REDIS_WARNING, "Error saving SQL DB on disk: %s", strerror(errno));
if (rc == SQLITE_OK) {
if (is_save)
redisLog(REDIS_NOTICE,"SQL DB [%s] saved on disk", filename);
} else
if (is_save)
redisLog(REDIS_WARNING, "Error saving SQL DB [%s] on disk: %s", filename, strerror(errno));
else
redisLog(REDIS_WARNING, "Error loading SQL DB [%s] from disk: %s", filename, strerror(errno));

/* SQLITE_OK and REDIS_OK are the same value: 0 */
return rc;
Expand Down

0 comments on commit 7ea9ff8

Please sign in to comment.