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


Ship it!




Seems fine to me, I’m more interested in the overall approach. Just to give you 
some context here. Originally we thought that libprocess shouldn’t log because 
it’s a library (e.g. glibc doesn’t log, stout returns errors to the user rather 
than logging), but this doesn’t really work since libprocess is its own runtime.

We thought a good strategy was to map to verbose levels:

```
VLOG(1) -> LOG(ERROR)
VLOG(2) -> LOG(WARNING)
VLOG(3) -> LOG(INFO)
VLOG(4) -> VLOG(1)
...
```

So the user could get errors by turning on vlog 1, warnings by going up to vlog 
2, etc.

In hindsight this wasn’t a good idea, as I said in the email on the dev list. 
We actually want the errors/warnings from libprocess in mesos, without having 
to turn on vlog1/2 globally. So, when you sent the email, I looked around at 
how other libraries handle this problem. That’s when I realized that it made 
most sense to let the user control the logging behavior by passing in the 
loggers (in our case this is just an interface from glog, since we don’t need 
to support other logging libraries for now).

- Benjamin Mahler


On Oct. 11, 2017, 1:57 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62891/
> -----------------------------------------------------------
> 
> (Updated Oct. 11, 2017, 1:57 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Mahler, and Till 
> Toenshoff.
> 
> 
> Bugs: MESOS-8074
>     https://issues.apache.org/jira/browse/MESOS-8074
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Increases vlog level of some recurring events to improve readability.
> Specifically, we now log the following events on vlog level three
> instead of level two:
>   "Spawned process <process>",
>   "Resuming <process>",
>   "Cleaning up <process>",
>   "Donating thread to <process> while waiting".
> 
> This does not imply a general change or a holistic approach concerning
> the libprocess verbose logs.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 
> a81ef747957db5bf388fac1a853c12fdd60d0cf7 
> 
> 
> Diff: https://reviews.apache.org/r/62891/diff/3/
> 
> 
> Testing
> -------
> 
> Run `GLOG_v=2 ./mesos-local.sh --log_dir=/tmp/test-mesos/log/ --num_slaves=3 
> --port=5037 --work_dir=/tmp/test-mesos/work/` and `GLOG_v=3 ./mesos-local.sh 
> --log_dir=/tmp/test-mesos/log/ --num_slaves=3 --port=5037 
> --work_dir=/tmp/test-mesos/work/` and checked that the new output was as 
> expected.
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>

Reply via email to