You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2023/08/15 15:33:13 UTC

[GitHub] [beam] Abacn commented on issue #27969: [Feature Request]: Support default log level and log level overrides for java direct runner

Abacn commented on issue #27969:
URL: https://github.com/apache/beam/issues/27969#issuecomment-1679139304

   Tested that simply call `SdkHarnessOptions.getSdkHarnessLogLevelOverrides` won't work on direct runner.
   
   If the java program is using `org.slf4j:slf4j-simple` for console logging, then one could specify the default log level and log level override via the command line option like
   
   ```
   -Dorg.slf4j.simpleLogger.defaultLogLevel=warn \
   -Dorg.slf4j.simpleLogger.log.com.github.yathu.loglevel=debug
   ```
   
   per https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html
   
   Or add log configuration file (`simplelogger.properties`) to classpath.
   
   Having a unified way to control logs in direct runner / remote runner is nice to have, however, it looks like configure log levels in run time is not trivial (different slf4j implementation / binding may be used) and Logger.setLevel may not be effective


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org