Skip to content

Commit

Permalink
FEATURE: bulk command logging for all commmand
Browse files Browse the repository at this point in the history
  • Loading branch information
computerphilosopher committed Jul 31, 2019
1 parent be69b0c commit 14558e9
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 131 deletions.
3 changes: 0 additions & 3 deletions cmd_in_second.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ static int32_t buffer_flush()
"Can't create buffer flush thread: %s\n", strerror(ret));
}


return ret;
}

Expand All @@ -177,7 +176,6 @@ static void buffer_add(const logtype* log)

buffer->ring[buffer->rear] = *log;
buffer->rear = (buffer->rear+1) % buffer->capacity;

}

static bool is_cmd_to_log(const char* collection_name, const char* cmd)
Expand All @@ -194,7 +192,6 @@ bool cmd_in_second_write(const char* collection_name, const char* cmd, const cha
timertype *timer = &this.timer;

logtype log = { {0}, {0} };

snprintf(log.client_ip, IP_LENGTH, "%s", client_ip);
snprintf(log.key, KEY_LENGTH, "%s", key);

Expand Down
Loading

0 comments on commit 14558e9

Please sign in to comment.