cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Creation of logs in a file

mac08_flo
New Contributor

Good afternoon.

I am trying to add logs in the creation of my code. The issue is that I haven't yet found a way to write the logs to a separate file, rather than having them output to the terminal; I want them to be stored in a file (example.log).

I have tried using basicConfig and specifying the path where I want to store the logs, but they are not being saved.

Could you help me? Am I missing some configuration, or do you know of any other way to store the logs?

1 REPLY 1

filipniziol
New Contributor III

Hi @mac08_flo ,

Use logging library. You can configure to log to terminal, to files etc.
https://www.highlight.io/blog/5-best-python-logging-libraries

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group