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: 

Custom logging using Log4J to a file

Retko
Contributor

Hello,

I would like to ask for help setting up the log4j.

I want to use log4j (log4j2) to generate custom log messages in my notebook when running.This message would be generated like this: logger.info("some info message") but using log4j not python logging module.

I want to store only this custom messages into a file on the driver for example under /tmp folder and the file name should be as name of the notebook.

It can be similar to this solution Writing PySpark logs in Apache Spark and Databricks | by Ivan Trusov | Medium , but it stores everything under same file and also with many other different log messages.

So is there something I can do to reach this logging requirement?

Thank you.

0 REPLIES 0

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