Skip to content

Commit

Permalink
Define logger methods before
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 10, 2013
1 parent 5108184 commit 0ec4de5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,22 @@ grn_default_logger_get_path(void)
return default_logger_path;
}

void
grn_logger_reopen(grn_ctx *ctx)
{
if (current_logger.reopen) {
current_logger.reopen(ctx, current_logger.user_data);
}
}

void
grn_logger_fin(grn_ctx *ctx)
{
if (current_logger.fin) {
current_logger.fin(ctx, current_logger.user_data);
}
}

static void
logger_info_func_wrapper(grn_ctx *ctx, grn_log_level level,
const char *timestamp, const char *title,
Expand Down Expand Up @@ -878,22 +894,6 @@ grn_logger_put(grn_ctx *ctx, grn_log_level level,
}
}

void
grn_logger_reopen(grn_ctx *ctx)
{
if (current_logger.reopen) {
current_logger.reopen(ctx, current_logger.user_data);
}
}

void
grn_logger_fin(grn_ctx *ctx)
{
if (current_logger.fin) {
current_logger.fin(ctx, current_logger.user_data);
}
}

static void
logger_init(void)
{
Expand Down

0 comments on commit 0ec4de5

Please sign in to comment.