Disable glog's "LOG(INFO)" logging
<p>I'm trying to optimize my c++ program. It uses caffe.<br>
When executing my program, caffe outputs around 1GB (!) of info logs every 15 mins. I suspect this impacts efficiency significantly. But I haven't found how to turn logging off. In <a href="https://stackoverflow.com/questions/28345346/glog-verbose-logging-boost-program-options">this question</a> someone suggested setting <code>FLAGS_v</code> manually.</p>

<p>With the following code I can disable <code>VLOG</code> logs by level, but <code>LOG(x)</code> logs are unaffected.</p>

<p>First lines in <code>main()</code>:</p>

<pre><code>FLAGS_v = 1; //disables vlog(2), vlog(3), vlog(4)
VLOG(0) &lt;&lt; "Verbose 0";
VLOG(1) &lt;&lt; "Verbose 1";
VLOG(2) &lt;&lt; "Verbose 2";
VLOG(3) &lt;&lt; "Verbose 3";
VLOG(4) &lt;&lt; "Verbose 4";
LOG(INFO) &lt;&lt; "LOG(INFO)";
LOG(WARNING) &lt;&lt; "LOG(WARNING)";
LOG(ERROR) &lt;&lt; "LOG(ERROR)";
</code></pre>

<p>Output:</p>

<pre><code>WARNING: Logging before InitGoogleLogging() is written to STDERR
I0523 19:06:51.484634 14115 main.cpp:381] Verbose 0
I0523 19:06:51.484699 14115 main.cpp:382] Verbose 1
I0523 19:06:51.484705 14115 main.cpp:386] LOG(INFO)
W0523 19:06:51.484710 14115 main.cpp:387] LOG(WARNING)
E0523 19:06:51.484715 14115 main.cpp:388] LOG(ERROR)
</code></pre>

<p>Is there another <code>flag</code> I'm unaware of? I'm thinking of commenting every <code>LOG(INFO)</code> line out, but I would like a more elegant solution. (I'd prefer a c++ solution over a command line flag solution).</p>