From 0f4975a68d4c88bafe8df07ec71e8ab2d5582bfa Mon Sep 17 00:00:00 2001 From: Marco Wang Date: Tue, 5 Nov 2019 17:33:07 +0800 Subject: [PATCH] doc: add information about log cleaner --- doc/glog.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/glog.html b/doc/glog.html index 0edaa66e7..699d2ceb8 100644 --- a/doc/glog.html +++ b/doc/glog.html @@ -543,6 +543,24 @@

Strip Logging Messages

all log messages associated with VLOGs as well as INFO log statements. +

Automatically Remove Old Logs

+ +

To enable the log cleaner: + +

+google::EnableLogCleaner(3); // keep your logs for 3 days
+
+ +And then Google glog will check if there are overdue logs whenever +a flush is performed. In this example, any log file from your project whose +last modified time is greater than 3 days will be unlink()ed. + +

This feature can be disabled at any time (if it has been enabled) + +

+google::DisableLogCleaner();
+
+

Notes for Windows users

Google glog defines a severity level ERROR, which is