summaryrefslogtreecommitdiff
path: root/logger.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2021-08-09 14:06:49 -0700
committerdormando <dormando@rydia.net>2021-08-09 14:06:49 -0700
commitd63db64889952b160036e90bdb1eba024cf33712 (patch)
tree4e99200e869d0d062bf91a4c24a43724b1878f49 /logger.h
parent617d7cd64d04698b76fee74882627690017e20ad (diff)
downloadmemcached-d63db64889952b160036e90bdb1eba024cf33712.tar.gz
logger: avoid polling without watchers
Inspired by #768 - logger thread would wake up once per second looking for watchers or log entries, but without any watchers. Now sleeps on a condition. Note that if I ever actually get logger to syslog/stdout/stderr/etc working properly this will still always poll.
Diffstat (limited to 'logger.h')
-rw-r--r--logger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/logger.h b/logger.h
index 5492f72..0f5377c 100644
--- a/logger.h
+++ b/logger.h
@@ -162,6 +162,7 @@ typedef struct {
int sfd; /* client fd */
int id; /* id number for watcher list */
uint64_t skipped; /* lines skipped since last successful print */
+ uint64_t min_gid; /* don't show log entries older than this GID */
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 */