<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom logging using Log4J to a file in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/custom-logging-using-log4j-to-a-file/m-p/42792#M27423</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to ask for help setting up the log4j.&lt;/P&gt;&lt;P&gt;I want to use &lt;STRONG&gt;log4j (log4j2)&lt;/STRONG&gt; to generate &lt;STRONG&gt;custom log messages&lt;/STRONG&gt; in my &lt;STRONG&gt;notebook&lt;/STRONG&gt; when running.This message would be generated like this: &lt;STRONG&gt;logger.info("some info message")&lt;/STRONG&gt; but using log4j &lt;STRONG&gt;not python logging module.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to store &lt;STRONG&gt;only&lt;/STRONG&gt; this custom messages into a &lt;STRONG&gt;file&lt;/STRONG&gt; on the driver for example under /tmp folder and the file name should be as name of the notebook.&lt;/P&gt;&lt;P&gt;It can be similar to this solution &lt;A href="https://polarpersonal.medium.com/writing-pyspark-logs-in-apache-spark-and-databricks-8590c28d1d51" target="_blank" rel="noopener"&gt;Writing PySpark logs in Apache Spark and Databricks | by Ivan Trusov | Medium&lt;/A&gt; , but it stores everything under same file and also with many other different log messages.&lt;/P&gt;&lt;P&gt;So is there something I can do to reach this logging requirement?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 13:37:00 GMT</pubDate>
    <dc:creator>Retko</dc:creator>
    <dc:date>2023-08-29T13:37:00Z</dc:date>
    <item>
      <title>Custom logging using Log4J to a file</title>
      <link>https://community.databricks.com/t5/data-engineering/custom-logging-using-log4j-to-a-file/m-p/42792#M27423</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to ask for help setting up the log4j.&lt;/P&gt;&lt;P&gt;I want to use &lt;STRONG&gt;log4j (log4j2)&lt;/STRONG&gt; to generate &lt;STRONG&gt;custom log messages&lt;/STRONG&gt; in my &lt;STRONG&gt;notebook&lt;/STRONG&gt; when running.This message would be generated like this: &lt;STRONG&gt;logger.info("some info message")&lt;/STRONG&gt; but using log4j &lt;STRONG&gt;not python logging module.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to store &lt;STRONG&gt;only&lt;/STRONG&gt; this custom messages into a &lt;STRONG&gt;file&lt;/STRONG&gt; on the driver for example under /tmp folder and the file name should be as name of the notebook.&lt;/P&gt;&lt;P&gt;It can be similar to this solution &lt;A href="https://polarpersonal.medium.com/writing-pyspark-logs-in-apache-spark-and-databricks-8590c28d1d51" target="_blank" rel="noopener"&gt;Writing PySpark logs in Apache Spark and Databricks | by Ivan Trusov | Medium&lt;/A&gt; , but it stores everything under same file and also with many other different log messages.&lt;/P&gt;&lt;P&gt;So is there something I can do to reach this logging requirement?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:37:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/custom-logging-using-log4j-to-a-file/m-p/42792#M27423</guid>
      <dc:creator>Retko</dc:creator>
      <dc:date>2023-08-29T13:37:00Z</dc:date>
    </item>
  </channel>
</rss>

