metaflow-service
metaflow-service copied to clipboard
Log messages sometimes do not appear
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.
@fumoboy007 which code?
@savingoyal All code in this repository. Fixed in #438.
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.