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

Wilfred Spiegelenburg commented on YUNIKORN-75:
-----------------------------------------------

Currently the core and  shim use a global logger to make sure they all use the 
same logging. This does bring with it some issues around changing log levels.
>From a zap perspective there is full support for changing the level on the fly 
>by modifying the level in the level object. This AtomicLevel can be changed on 
>the fly as outlined in the PR. Each logger (or child) can have its own config 
>and even level. To change the level we do need access to the AtomicLevel that 
>is set in the logger. We cannot get to it from the logger itself and we need 
>to keep a handle on it.

This is why it works in the core running the tests: we have the config object 
that the logger was build with and thus a handle on the AtomicLevel needed.

In the case of the combined k8shim and core binary the shim is the starting 
point (we should look at that anyway). That means the AtomicLevel is created in 
the shim added to the config and a logger is created. 

We have a couple of ways forward and all are major work:
* Move the startup of the system to the core including the init of the logger 
into the core and make the shim follow the core 
* Keep track of the AtomicLevel in the shim and make some interface between the 
core to the shim to pass the update
* pass the AtomicLevel created in the shim to the core and update it in the core

Both the 2nd and 3rd are going to be patch work as we need to implement passing 
things around that we really should not be passing around.
The first option is not a simple change and we should look at that for after 
0.8 but it makes much more sense. Specially when we look at having more than 
one shim to support in the future.

> REST API for changing log level
> -------------------------------
>
>                 Key: YUNIKORN-75
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-75
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - scheduler
>            Reporter: Adam Antal
>            Assignee: Adam Antal
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We need a rest API to change the logging level, so we can change the logging 
> level on-the-fly. It can be used to debug in production issues where for most 
> of the time, only INFO level log is needed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to