Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add information about log cleaner #491

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions doc/glog.html
Original file line number Diff line number Diff line change
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