You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Nan Xiao <xi...@gmail.com> on 2015/12/30 09:30:06 UTC
How can mesos print logs from VLOG function?
Hi all,
I want mesos prints logs from VLOG function:
VLOG(1) << "Executor started at: " << self()
<< " with pid " << getpid();
But from mesos help:
$ sudo ./bin/mesos-master.sh --help | grep -i LOG
--external_log_file=VALUE Specified the externally
managed log file. This file will be
stderr logging as the log
file is otherwise unknown to Mesos.
--[no-]initialize_driver_logging Whether to automatically
initialize Google logging of scheduler
--[no-]log_auto_initialize Whether to automatically
initialize the replicated log used for the
registry. If this is set to
false, the log has to be manually
--log_dir=VALUE Directory path to put log
files (no default, nothing
does not affect logging to stderr).
NOTE: 3rd party log
messages (e.g. ZooKeeper) are
--logbufsecs=VALUE How many seconds to buffer
log messages for (default: 0)
--logging_level=VALUE Log message at or above
this level; possible values:
will affect just the logs
from log_dir (if specified) (default: INFO)
--[no-]quiet Disable logging to stderr
(default: false)
--quorum=VALUE The size of the quorum of
replicas when using 'replicated_log' based
available options are
'replicated_log', 'in_memory' (for testing). (default: replicated_log)
I can't find related configurations.
So how can mesos print logs from VLOG function? Thanks in advance!
Best Regards
Nan Xiao
Re: How can mesos print logs from VLOG function?
Posted by Nan Xiao <xi...@gmail.com>.
Hi Marco,
Yes, it worked, thanks very much!
Best Regards
Nan Xiao
On Wed, Dec 30, 2015 at 4:55 PM, Marco Massenzio <m....@gmail.com> wrote:
> Mesos uses Google Logging[0] and, according to the documentation there, the
> VLOG(n) calls are only logged if a variable GLOG_v=m (where n > m) is
> configured when running Mesos (the other suggested way, using --v=m won't
> work for mesos).
>
> Having said that, I have recently been unable to make this work - so there
> may be some other trickery at work.
>
> [0] https://google-glog.googlecode.com/svn/trunk/doc/glog.html
>
> --
> Marco Massenzio
> http://codetrips.com
>
> On Wed, Dec 30, 2015 at 12:30 AM, Nan Xiao <xi...@gmail.com> wrote:
>>
>> Hi all,
>>
>> I want mesos prints logs from VLOG function:
>>
>> VLOG(1) << "Executor started at: " << self()
>> << " with pid " << getpid();
>>
>> But from mesos help:
>>
>> $ sudo ./bin/mesos-master.sh --help | grep -i LOG
>> --external_log_file=VALUE Specified the externally
>> managed log file. This file will be
>> stderr logging as the log
>> file is otherwise unknown to Mesos.
>> --[no-]initialize_driver_logging Whether to automatically
>> initialize Google logging of scheduler
>> --[no-]log_auto_initialize Whether to automatically
>> initialize the replicated log used for the
>> registry. If this is set to
>> false, the log has to be manually
>> --log_dir=VALUE Directory path to put log
>> files (no default, nothing
>> does not affect logging to
>> stderr).
>> NOTE: 3rd party log
>> messages (e.g. ZooKeeper) are
>> --logbufsecs=VALUE How many seconds to buffer
>> log messages for (default: 0)
>> --logging_level=VALUE Log message at or above
>> this level; possible values:
>> will affect just the logs
>> from log_dir (if specified) (default: INFO)
>> --[no-]quiet Disable logging to stderr
>> (default: false)
>> --quorum=VALUE The size of the quorum of
>> replicas when using 'replicated_log' based
>> available options are
>> 'replicated_log', 'in_memory' (for testing). (default: replicated_log)
>>
>> I can't find related configurations.
>>
>> So how can mesos print logs from VLOG function? Thanks in advance!
>>
>> Best Regards
>> Nan Xiao
>
>
Re: How can mesos print logs from VLOG function?
Posted by Marco Massenzio <m....@gmail.com>.
Mesos uses Google Logging[0] and, according to the documentation there, the
VLOG(n) calls are only logged if a variable GLOG_v=m (where n > m) is
configured when running Mesos (the other suggested way, using --v=m won't
work for mesos).
Having said that, I have recently been unable to make this work - so there
may be some other trickery at work.
[0] https://google-glog.googlecode.com/svn/trunk/doc/glog.html
--
*Marco Massenzio*
http://codetrips.com
On Wed, Dec 30, 2015 at 12:30 AM, Nan Xiao <xi...@gmail.com> wrote:
> Hi all,
>
> I want mesos prints logs from VLOG function:
>
> VLOG(1) << "Executor started at: " << self()
> << " with pid " << getpid();
>
> But from mesos help:
>
> $ sudo ./bin/mesos-master.sh --help | grep -i LOG
> --external_log_file=VALUE Specified the externally
> managed log file. This file will be
> stderr logging as the log
> file is otherwise unknown to Mesos.
> --[no-]initialize_driver_logging Whether to automatically
> initialize Google logging of scheduler
> --[no-]log_auto_initialize Whether to automatically
> initialize the replicated log used for the
> registry. If this is set to
> false, the log has to be manually
> --log_dir=VALUE Directory path to put log
> files (no default, nothing
> does not affect logging to
> stderr).
> NOTE: 3rd party log
> messages (e.g. ZooKeeper) are
> --logbufsecs=VALUE How many seconds to buffer
> log messages for (default: 0)
> --logging_level=VALUE Log message at or above
> this level; possible values:
> will affect just the logs
> from log_dir (if specified) (default: INFO)
> --[no-]quiet Disable logging to stderr
> (default: false)
> --quorum=VALUE The size of the quorum of
> replicas when using 'replicated_log' based
> available options are
> 'replicated_log', 'in_memory' (for testing). (default: replicated_log)
>
> I can't find related configurations.
>
> So how can mesos print logs from VLOG function? Thanks in advance!
>
> Best Regards
> Nan Xiao
>