CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
logvolume.h
Go to the documentation of this file.
1#pragma once
4
24
25#include <cx/log/log.h>
26
27CX_C_BEGIN
28
32typedef struct LogStats {
33 uint64 enqueued;
34 uint64 dropped;
35 uint64 sampled;
36 uint64 suppressed;
37 uint64 synchronous;
38 uint32 queued;
39 uint32 queuedmax;
40 uint32 groups;
42
52void logGetStats(_Out_ LogStats* out);
53
55void logResetStats(void);
56
69void logSetStatsInterval(int64 interval);
70
85void logChanSetSampling(_In_opt_ LogChannel* chan, uint32 n);
86
104void logSetDedup(int64 window, uint32 threshold);
105
118void logSetSyncLevel(int level);
119
133void logPanicFlush(void);
134
136
137CX_C_END
void logChanSetSampling(LogChannel *chan, uint32 n)
void logResetStats(void)
Zero the cumulative counters and the queue high-water mark.
void logSetDedup(int64 window, uint32 threshold)
void logSetStatsInterval(int64 interval)
void logGetStats(LogStats *out)
void logSetSyncLevel(int level)
void logPanicFlush(void)
Core logging system API.
uint64 dropped
Entries lost because a queue and its overflow list were both full.
Definition logvolume.h:34
uint32 queued
Entries currently waiting in drain queues, summed over groups.
Definition logvolume.h:38
uint32 groups
Number of drain groups.
Definition logvolume.h:40
uint32 queuedmax
High-water mark of the above.
Definition logvolume.h:39
uint64 synchronous
Entries written from the logging thread under backpressure.
Definition logvolume.h:37
uint64 suppressed
Records the drain-thread deduplicator did not deliver.
Definition logvolume.h:36
uint64 sampled
Entries never created because sampling discarded them.
Definition logvolume.h:35
uint64 enqueued
Entries created and handed to at least one drain group.
Definition logvolume.h:33