> On Oct. 22, 2013, 1:05 a.m., Benjamin Hindman wrote:
> > src/logging/logging.cpp, lines 104-106
> > <https://reviews.apache.org/r/14800/diff/1/?file=368956#file368956line104>
> >
> >     I think we want to add an else if which turns logging to stderr back 
> > off:
> >     
> >     if (!flags.quiet) {
> >       FLAGS_stderrthreshold = 0; // INFO.
> >     } else {
> >       FLAGS_logtostderr = false;
> >     }
> >     
> >     Otherwise, if someone specifies 'quiet' they'll still get logging to 
> > stderr. Make sense?
> 
> Yuval Pavel Zholkover wrote:
>     Sorry, I'm learning to use reviewboard properly.
>     FLAGS_logtostderr must always be set true whenever log_dir is empty. It 
> actually prevents glog from writing files to /tmp.
>     
>     Current mesos behaviour is as follows:
>     * no extra arguments - logs with severity level INFO and higher are 
> written to stderr and to files in /tmp (this is wrong).
>     * without log_dir and --quiet - logs with severity level ERROR and higher 
> are written to stderr and to files in /tmp (this is wrong).
>     * with log_dir set   - logs with severity level INFO and higher are 
> written to stderr and to files in <logdir>.
>     * with log_dir set and --quiet - logs with severity level ERROR and 
> higher are written to stderr and to files in <logdir>
>     
>     Propsed patch v2 behavour is as follows:
>     * no extra arguments - logs with severity level INFO and higher are 
> written to stderr and no files are outputed.
>     * without log_dir and --quiet - logs with severity level INFO and higher 
> (this is wrong) are written to stderr and no files are outputed.
>     * with log_dir set   - logs with severity level INFO and higher are 
> written to stderr and to files in <logdir>.
>     * with log_dir set and --quiet - logs with severity level ERROR and 
> higher are written to stderr and to files in <logdir>
>     
>     I think the patch v2 behaviour makes more sense, as the only thing it 
> does is being extra verbose when log_dir is not set and --quiet is requsted.
> 
> Ben Mahler wrote:
>     Hey Yuval, is there an issue in the glog issue tracker related to the bug 
> you described below?
> 
> Yuval Pavel Zholkover wrote:
>     Hi Ben, thanks for taking the time to review this. I did some digging and 
> I think this is related but not the exact issue:
>     http://code.google.com/p/google-glog/issues/detail?id=128
>     
>

Perhaps to get around the extra verbosity we can do:

google::SetStderrLogging(3);

As suggested in the linked issue?


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14800/#review27268
-----------------------------------------------------------


On Oct. 22, 2013, 6:28 a.m., Yuval Pavel Zholkover wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14800/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2013, 6:28 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> The current intialization of glog creates log files in /tmp even when the 
> log_dir command argument is not passed.
> Setting FLAGS_logtostderr to true disables all log file creation/writes.
> 
> 
> Diffs
> -----
> 
>   src/logging/logging.cpp 850fb3c 
> 
> Diff: https://reviews.apache.org/r/14800/diff/
> 
> 
> Testing
> -------
> 
> manual - during make check /tmp gets filled with glog logs (timestamped and 
> symlinked)
> the patch fixes it
> 
> 
> Thanks,
> 
> Yuval Pavel Zholkover
> 
>

Reply via email to