diff options
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r-- | logd/LogBuffer.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h index 879baea..9ee243d 100644 --- a/logd/LogBuffer.h +++ b/logd/LogBuffer.h @@ -37,7 +37,6 @@ class LogBuffer { pthread_mutex_t mLogElementsLock; LogStatistics stats; - bool dgramQlenStatistics; PruneList mPrune; @@ -47,13 +46,14 @@ public: LastLogTimes &mTimes; LogBuffer(LastLogTimes *times); + void init(); - void log(log_id_t log_id, log_time realtime, - uid_t uid, pid_t pid, pid_t tid, - const char *msg, unsigned short len); - log_time flushTo(SocketClient *writer, const log_time start, + int log(log_id_t log_id, log_time realtime, + uid_t uid, pid_t pid, pid_t tid, + const char *msg, unsigned short len); + uint64_t flushTo(SocketClient *writer, const uint64_t start, bool privileged, - bool (*filter)(const LogBufferElement *element, void *arg) = NULL, + int (*filter)(const LogBufferElement *element, void *arg) = NULL, void *arg = NULL); void clear(log_id_t id, uid_t uid = AID_ROOT); @@ -63,11 +63,6 @@ public: // *strp uses malloc, use free to release. void formatStatistics(char **strp, uid_t uid, unsigned int logMask); - void enableDgramQlenStatistics() { - stats.enableDgramQlenStatistics(); - dgramQlenStatistics = true; - } - void enableStatistics() { stats.enableStatistics(); } @@ -83,7 +78,7 @@ public: private: void maybePrune(log_id_t id); void prune(log_id_t id, unsigned long pruneRows, uid_t uid = AID_ROOT); - + LogBufferElementCollection::iterator erase(LogBufferElementCollection::iterator it); }; #endif // _LOGD_LOG_BUFFER_H__ |