Skip to content

Commit

Permalink
doc: add information about log cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
aesophor committed Nov 5, 2019
1 parent 5ef521d commit 0f4975a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/glog.html
Expand Up @@ -543,6 +543,24 @@ <h3><A NAME=strip>Strip Logging Messages</A></h3>
all log messages associated with <code>VLOG</code>s as well as
<code>INFO</code> log statements.

<h3><A NAME=strip>Automatically Remove Old Logs</A></h3>

<p>To enable the log cleaner:

<pre>
google::EnableLogCleaner(3); // keep your logs for 3 days
</pre>

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.

<p>This feature can be disabled at any time (if it has been enabled)

<pre>
google::DisableLogCleaner();
</pre>

<h3><A NAME=windows>Notes for Windows users</A></h3>

<p>Google glog defines a severity level <code>ERROR</code>, which is
Expand Down

0 comments on commit 0f4975a

Please sign in to comment.