Netflix / metaflow-service

:rocket: Metadata tracking and UI service for Metaflow!
http://www.metaflow.org
Apache License 2.0
193 stars 71 forks source link

Log messages sometimes do not appear #437

Open fumoboy007 opened 2 months ago

fumoboy007 commented 2 months ago

The code uses Python’s print function to log messages. However, print is buffered by default, so messages may not appear immediately or at all.

savingoyal commented 2 months ago

@fumoboy007 which code?

fumoboy007 commented 2 months ago

@savingoyal All code in this repository. Fixed in #438.

saikonen commented 1 month ago

I think the existing print statements might be leftovers from way back. The preferred way to fix this issue should probably be to utilize the preconfigured logger from services.utils wherever possible.

from services.utils import logging

logger = logging.getLogger("ComponentName")
...

logger.info("some important message")

some of the subprocess prints for the cache explicitly flush though so they should not be affected by the issue.