0

I've written a small class to override default logging and output my logs as JSON. One of the steps is to do the following:

logging.basicConfig(format='%(message)s')

Works great as resultant logs omit timestamp, etc. However, any logging events that occur "within" a ray.get() are prepended with ray's format. I tried to set the logging format on ray, but doesn't appear to be respected.

import ray
ray.init(local_mode=False if PARALLEL else True, logging_level=logging.DEBUG, logging_format="%(message)s", num_cpus=int(os.environ['RAY_NUM_CPUS']))

console output:

2020-01-21 04:45:57+0000 [-] (pid=38) {"my": "json"}

0 Answers0