Skip to content

Commit

Permalink
[python] flush logging output before process end (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Mar 23, 2023
1 parent ea1b41c commit 53c9718
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engines/python/setup/djl_python_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def main():
logging.exception("Python engine process died")
finally:
logging.info(f"{pid} - Python process finished")
sys.stdout.flush()
sys.stderr.flush()
logging.shutdown()
if sock_type == 'unix':
if os.path.exists(sock_name):
os.remove(sock_name)
Expand Down

0 comments on commit 53c9718

Please sign in to comment.