Is there a variable which will tell me which log level is in effect during an agent run? #4801
Replies: 4 comments 2 replies
-
With some more experimentation and thinking I think I see the problem here. The "last one wins" when building up the slist with iterating over the values of
$ cf-agent -Kdf ./test.cf | grep R:
R: args_list is --debug
R: inform mode
R: debug mode
R: verbose_mode
$ cf-agent -Kvf ./test.cf | grep R:
R: args_list is --verbose
R: inform mode
R: verbose_mode
$ cf-agent -KIf ./test.cf | grep R:
R: args_list is --inform
R: inform mode |
Beta Was this translation helpful? Give feedback.
-
Hi @craigcomstock, I just wanted to offer another way to build a list based on class presence. Example policy:
Example execution:
Example execution output:
|
Beta Was this translation helpful? Give feedback.
-
I understand that the log level can vary according to attributes on a promise so what I am after here is any log level requested by the cf-agent arguments on the command line. |
Beta Was this translation helpful? Give feedback.
-
On Mon, Oct 3, 2022 at 10:17 AM Craig Comstock ***@***.***> wrote:
I understand that the log level can vary according to attributes on a
promise so what I am after here is any log level requested by the cf-agent
arguments on the command line.
What's the use case, Craig?
|
Beta Was this translation helpful? Give feedback.
-
I want to pass along to a python script I am running, whether the agent is in inform, verbose or debug mode so that if a user is diagnosing a problem they can get more information.
I tried the following but always just get
R: args_list is --inform
instead of differences when I run with--debug
--verbose
and--inform
.Beta Was this translation helpful? Give feedback.
All reactions