Skip to content

Commit

Permalink
add warning for failed symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyasKallingal committed Jul 27, 2024
1 parent 35002d3 commit 221b194
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sky/utils/log_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,7 @@ def create_and_symlink_log_dir(log_dir: str):
try:
os.symlink(log_dir, symlink_path)
except OSError:
# No warning if logging to /dev/null
if log_dir != os.path.dirname(os.devnull):
logger.warning(f'Failed to symlink to latest logs at {symlink_path!r}.')
return

0 comments on commit 221b194

Please sign in to comment.