summaryrefslogtreecommitdiff
path: root/logger.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-06-12 18:29:44 -0700
committerdormando <dormando@rydia.net>2016-06-16 17:14:35 -0700
commit1b03a9c6a443eddcff709b4e7c97dbab3eb9534b (patch)
tree54836233a5ff3c43accea945aa38d1fda5960fe1 /logger.h
parenta4f8b982fa7cd404a007991e99e2f7d53cdef0dc (diff)
downloadmemcached-1b03a9c6a443eddcff709b4e7c97dbab3eb9534b.tar.gz
poll() smarter when full, print skipped count
When lines are skipped to a watcher, a [skipped: n] is printed before resuming. Also polls full watcher directly once, and will wait until the outer loop to re-poll. Think the routine can be simplified... it works so will leave it and revisit later.
Diffstat (limited to 'logger.h')
-rw-r--r--logger.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/logger.h b/logger.h
index c55186e..9aa8539 100644
--- a/logger.h
+++ b/logger.h
@@ -82,10 +82,10 @@ enum logger_watcher_type {
typedef struct {
void *c; /* original connection structure. still with source thread attached */
- int chunks; /* count of chunks stored up */
int sfd; /* client fd */
- uint64_t skipped; /* lines skipped since last successful print */
int id; /* id number for watcher list */
+ uint64_t skipped; /* lines skipped since last successful print */
+ bool failed_flush; /* recently failed to write out (EAGAIN), wait before retry */
enum logger_watcher_type t; /* stderr, client, syslog, etc */
uint16_t eflags; /* flags we are interested in */
bipbuf_t *buf; /* per-watcher output buffer */