EdColeman commented on PR #4488:
URL: https://github.com/apache/accumulo/pull/4488#issuecomment-2073419896

   Would there be any benefit of allowing the property to be dynamic and stored 
in ZooKeeper?  That would also require a watcher to react to updates - and that 
is likely to make using this class much harder, basically a server context 
would likely be required to get the instance / zoo reader / zoo watcher.  
   
   It would really complicate the code, but would allow  things to be adjusted 
without restarting services.
   
   The other draw-back would be because this is a general property, setting it 
will change all instances and it may be really hard to know what they are.
   
   One alternative could be to use log4j and isLevelEnabled to toggle between 
messages and or message frequency.  Something like the following using a count, 
or could be modified to use a time.
   
   ```
      if(LOG.isTraceEnabled()){
         LOG.trace("always log");
       } else if(LOG.isDebugEnabled() && (count++ % 10) == 0){
         LOG.debug("log every 10");
       } else if(LOG.isInfoEnabled() && (count++ % 100) == 0) {
         LOG.info("log every 100");
       }
   ```
   
   Then, using named loggers and standard configuration, the level for that 
class could be dynamically adjusted at runtime on a named logger basis?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to