[ 
https://issues.apache.org/jira/browse/IMPALA-6877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463013#comment-16463013
 ] 

Bikramjeet Vig commented on IMPALA-6877:
----------------------------------------

It turns out that using "-vmodule" dynamically is more restrictive than "-v" as 
is apparent from this comment:

{noformat}
// Set VLOG(_IS_ON) level for module_pattern to log_level.
// This lets us dynamically control what is normally set by the --vmodule flag.
// Returns the level that previously applied to module_pattern.
// NOTE: To change the log level for VLOG(_IS_ON) sites
//       that have already executed after/during InitGoogleLogging,
//       one needs to supply the exact --vmodule pattern that applied to them.
//       (If no --vmodule pattern applied to them
//       the value of FLAGS_v will continue to control them.)
extern GOOGLE_GLOG_DLL_DECL int SetVLOGLevel(const char* module_pattern,
                                             int log_level);
{noformat}

This means that unlike "-v" commandline option which can be changed dynamically 
and takes effect after change, the "-vmodule" commandline is only used once 
during initialization (call to InitGoogleLogging() ) and afterwards any change 
to this commandline parameter will have no effect.

Instead we would need to use SetVLOGLevel() to change the log level of a 
particular "vmodule pattern" defined earlier. 
I looked at the source code and it seems like SetVLOGLevel() also supports 
adding more patterns but once patterns are added to the list, they cannot be 
removed and will always override the global "-v" level. This means that if we 
want to reset/remove the vmodule patterns, that currently is not possible. The 
most we can do is keep a track externally of which patterns have been added and 
have an option in the debug page to reset them to the global "-v" level. But 
then we will have to do that everytime we change the "-v" level.

> Allow setting -vmodule from debug page
> --------------------------------------
>
>                 Key: IMPALA-6877
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6877
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 2.12.0
>            Reporter: Tim Armstrong
>            Assignee: Bikramjeet Vig
>            Priority: Major
>              Labels: supportability
>
> We allow setting the global verbosity level from the debug page, but we don't 
> allow setting it per module, E.g. -vmodule admission-controller=2



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to