Ray logs - log.debug and log.info don't display

Hi guys!

I’m trying to get all detailed logs from a ray task. Here is a simple example of my code:

 import ray
 import logging
  
 # Start Ray.
 ray.init()
  
  
 @ray.remote
 def f():
   log = logging.getLogger()
   log.setLevel(logging.DEBUG)
   log.debug("MY DEBUG STH")
   log.info("MY INFO STH")
   log.warning("MY WARNING STH")
   log.error("MY ERROR STH")
  
 ray.get(f.remote())

Here is the outcome:

(f pid=73317) MY WARNING STH
(f pid=73317) MY ERROR STH

Do you know what might be the reason of not getting logs for logs for log.debug and log.info ?

I think this is actually an issue with usage of the logging package.

Try this (adapted from stackoverflow):

logging.basicConfig(level=logging.DEBUG, format='%(message)s')