- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2023 01:39 AM
@Aaron Kaijser :
The error message you are seeing suggests that there is an issue with the file handler used to write your logs. Specifically, it looks like the stream handler used to write the logs to the console is fine, but the
TimedRotatingFileHandler is encountering an issue when attempting to write to the log file. One possible cause for this error is that the path to the log file is not accessible from the Databricks cluster. Check that the path to the log file is correct and that the Databricks cluster has permission to write to the specified location.
Another possibility is that the log file is being locked by another process, preventing the TimedRotatingFileHandler from writing to it. This can occur if another process has the log file open, for example. You can try modifying your logging configuration to use a different file handler, such as FileHandler, and see if the issue persists.
Finally, it's worth noting that writing to the file system is not a recommended way to do logging in Databricks. Databricks provides a logging API that you can use to log messages to the cluster's driver logs, which are stored in a central location and can be accessed from the Databricks UI. To use the Databricks logging API, you can replace the file handler in your logging configuration with a Databricks specific handler, such as databricks.logging.JsonFileHandler.