Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ private[spark] class DriverLogger(conf: SparkConf) extends Logging {
builder.setBufferedIo(false)
builder.setConfiguration(config)
builder.withFileName(localLogFile)
builder.setIgnoreExceptions(false)
// SPARK-57774: Set to true to avoid propagating log4j internal exception
// (e.g., due to log4j bugs) to the caller.
builder.setIgnoreExceptions(true)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems like a trade-off. With true here, a real failure to write the local driver log (disk full, permission loss mid-run) is now silently handled by log4j's internal error handler rather than surfacing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think we have any logic to handle exceptions thrown by logging calls, if users really care about that, maybe they should customize log4j's internal error handler?

builder.setLayout(layout)
builder.setName(DriverLogger.APPENDER_NAME)
builder.build()
Expand Down