[Train V2] Output JSON structured log files for system and application logs #49414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Structured logging means outputting system logs (ex: internal Ray library logs) and application logs (ex: log outputs from user-defined functions) in JSON format with extra metadata to be ingested by some external log-viewer. This gives users a better experience searching through logs. For example, Ray Train users will be able to filter logs with tags such as worker rank.
In the
ray-session-id/logs/ray-train/
folder, there are four log files listed:where
worker_id=070d6
is the the ray train controller process;worker_id=56ab6
is the ray train worker process.Note that internal logs contains only system logs and are not interesting to the users, it's only for ray engineer teams. The user logs contain both udf and system logs that the user would be interested about.
In
ray-train-sys-controller-070d6.log
is below:In
ray-train-app-controller-070d6
is below:In
ray-train-sys-worker-56ab6.log
is:In
ray-train-app-worker-56ab6.log
is below, where logger output and print output are both captured here.:In console output, we have below plain text output: