<?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 How to add I custom logging in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/20831#M14109</link>
    <description>&lt;P&gt;I want to add custom logs that redirect in the Spark driver logs. Can I use the existing logger classes to have my application logs or progress message in the Spark driver logs. &lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 06:37:25 GMT</pubDate>
    <dc:creator>brickster_2018</dc:creator>
    <dc:date>2021-06-24T06:37:25Z</dc:date>
    <item>
      <title>How to add I custom logging in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/20831#M14109</link>
      <description>&lt;P&gt;I want to add custom logs that redirect in the Spark driver logs. Can I use the existing logger classes to have my application logs or progress message in the Spark driver logs. &lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 06:37:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/20831#M14109</guid>
      <dc:creator>brickster_2018</dc:creator>
      <dc:date>2021-06-24T06:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add I custom logging in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/20832#M14110</link>
      <description>&lt;P&gt;&lt;B&gt;Set custom log messages in Scala:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%scala 
&amp;nbsp;
import org.slf4j.{Logger, LoggerFactory}
&amp;nbsp;
val customLogs = LoggerFactory.getLogger("CustomLogs")
&amp;nbsp;
customLogs.info("Testing INFO Logs")
&amp;nbsp;
customLogs.warn("Testing WARN Logs")
&amp;nbsp;
customLogs.error("Testing ERROR Logs")
&amp;nbsp;
print("This message will be in stdout instead of log4j")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Set custom logs messages in Python&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%python
&amp;nbsp;
log4jLogger = spark.sparkContext._jvm.org.apache.log4j 
&amp;nbsp;
customLogs = log4jLogger.LogManager.getLogger("CustomLogs") 
&amp;nbsp;
&amp;nbsp;
customLogs.info("Testing INFO Logs")
&amp;nbsp;
customLogs.warn("Testing WARN Logs")
&amp;nbsp;
customLogs.error("Testing ERROR Logs")
&amp;nbsp;
print("This message will be in stdout instead of log4j")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 08:35:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/20832#M14110</guid>
      <dc:creator>brickster_2018</dc:creator>
      <dc:date>2021-06-24T08:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add I custom logging in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/59514#M31434</link>
      <description>&lt;P&gt;Adding more clarity for people using this.&amp;nbsp;The log files will be located in&amp;nbsp;dbfs:/cluster-logs/&amp;lt;cluster_id&amp;gt;/driver/log4j-active.log&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/36149"&gt;@brickster_2018&lt;/a&gt;&amp;nbsp;is there a way to get the custom logs saved in its own .log file? Im guessing we would have to manually connect to azure blob and store it there (via azure-storage-logging python library)&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 21:38:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/59514#M31434</guid>
      <dc:creator>Kaizen</dc:creator>
      <dc:date>2024-02-06T21:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to add I custom logging in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/59823#M31508</link>
      <description>&lt;P&gt;1) Is it possible to save all the custom logging to its own file? Currently it is being logging with all other cluster logs (see image)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;2) Also Databricks it seems like a lot of blank files are also being created for this. Is this a bug? this includes the stderr and stdout files in the driver &amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/26078"&gt;@Debayan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kaizen_0-1707502477163.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6182i8239030EB4AA02BC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Kaizen_0-1707502477163.png" alt="Kaizen_0-1707502477163.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 18:24:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-add-i-custom-logging-in-databricks/m-p/59823#M31508</guid>
      <dc:creator>Kaizen</dc:creator>
      <dc:date>2024-02-09T18:24:18Z</dc:date>
    </item>
  </channel>
</rss>

