Skip to content

Commit

Permalink
Don't use the legacy raft_logger interface
Browse files Browse the repository at this point in the history
  • Loading branch information
freeekanayaka authored and Shlomi Noach committed Feb 16, 2020
1 parent 997a49f commit c6bdb5b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 62 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ test_lib_SOURCES = \
test/lib/heap.c \
test/lib/logger.c \
test/lib/munit.c \
test/lib/raft.c \
test/lib/server.c \
test/lib/sqlite.c \
test/lib/uv.c
Expand Down
23 changes: 0 additions & 23 deletions src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,3 @@ void loggerDefaultEmit(void *data, int level, const char *fmt, va_list args)

fprintf(stderr, "%s\n", buf);
}

void loggerRaftEmit(struct raft_logger *l,
int level,
raft_time time,
const char *file,
int line,
const char *format,
...)
{
struct logger *logger = l->impl;
va_list args;

(void)file;
(void)line;
(void)time;

/* TODO: properly setup raft logging */
return;

va_start(args, format);
logger->emit(logger->data, level, format, args);
va_end(args);
}
9 changes: 0 additions & 9 deletions src/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ struct logger
/* Default implementation of dqlite_emit, using stderr. */
void loggerDefaultEmit(void *data, int level, const char *fmt, va_list args);

/* Forward log messages to a dqlite logger. */
void loggerRaftEmit(struct raft_logger *l,
int level,
raft_time time,
const char *file,
int line,
const char *format,
...);

/* Emit a log message with a certain level. */
/* #define debugf(L, FORMAT, ...) \ */
/* logger__emit(L, DQLITE_DEBUG, FORMAT, ##__VA_ARGS__) */
Expand Down
21 changes: 0 additions & 21 deletions test/lib/raft.c

This file was deleted.

8 changes: 0 additions & 8 deletions test/lib/raft.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,4 @@
munit_assert_int(rv2, ==, 0); \
}

void test_raft_emit(struct raft_logger *l,
int level,
raft_time time,
const char *file,
int line,
const char *format,
...);

#endif /* TEST_RAFT_H */

0 comments on commit c6bdb5b

Please sign in to comment.