Skip to content

Commit

Permalink
Minor logs improvement. Log bugogging missing sector
Browse files Browse the repository at this point in the history
  • Loading branch information
core software devel committed Jul 30, 2024
1 parent 62644af commit 47e761b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ldb.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "./ldb/types.h"
#include "./ldb/mz.h"

#define LDB_VERSION "4.1.2"
#define LDB_VERSION "4.1.3"

#define LDB_TABLE_DEFINITION_UNDEFINED -1
#define LDB_TABLE_DEFINITION_STANDARD 0
Expand Down
2 changes: 1 addition & 1 deletion src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void logger_dbname_set(char * db)
time_t currentTime = time(NULL);
struct tm *localTime = localtime(&currentTime);
char timeString[64];
strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", localTime);
strftime(timeString, sizeof(timeString), "Exec Time: %Y-%m-%d %H:%M:%S", localTime);
FILE * f = fopen(import_logger_path, "a");
if (f)
{
Expand Down
4 changes: 2 additions & 2 deletions src/recordset.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ uint32_t ldb_fetch_recordset(uint8_t *sector, struct ldb_table table, uint8_t* k

uint32_t records = 0;
bool done = false;

logger_dbname_set(table.db);
do
{
/* Read node */
next = ldb_node_read(sector, table, ldb_sector, next, key, &node_size, &node, 0);
if (ldb_read_failure)
{
log_info("Error reading table %s/%s - sector %02x: the file is not available or the node doesn't exist\n", table.db, table.table, *sector);
log_info("Error reading table %s/%s - sector %02x: the file is not available or the node doesn't exist\n", table.db, table.table, key[0]);
ldb_read_failure = false;
next = 0;
}
Expand Down

0 comments on commit 47e761b

Please sign in to comment.