Skip to content

Conversation

@helshazly-sony
Copy link
Collaborator

Instead of writing logs to a file, this PR redirects all Job Dispatcher's logs, prints, messages to stdout. This setup is useful in Docker, Kubernetes, or Spark driver/executor logs.

@helshazly-sony helshazly-sony self-assigned this Oct 7, 2025
@helshazly-sony helshazly-sony added the enhancement New feature or request label Oct 7, 2025
Copy link
Collaborator

@vbirsan-sony vbirsan-sony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helshazly-sony I might be mistaken, but aren’t the Octopus server logs also streamed to a file? Will that be handled in a different PR?


logger = logging.getLogger(__name__)
logging.basicConfig(filename=Constants.LOG_FILE_PATH,
logging.basicConfig(stream=sys.stdout,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if you’ve considered adding a prefix to the logs. Right now, both the job dispatcher and Spark run in the same container, Spark is sending its logs to stdout, and we’ll now be sending the job dispatcher’s logs there as well.

Will we be able to tell which log lines belong to which service? It’s not an issue when the job dispatcher runs in its own container, but in this setup, all logs will be mixed together. Perhaps adding a prefix or an identifier to each log record would make it easier to filter out the job dispatcher logs

poetry run uvicorn src.main:app --host 0.0.0.0 --reload &

# Print the log file location
echo "$LOG_FILE"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this line and line 7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants