<?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 Re: logging.basicConfig not creating a file in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18122#M11978</link>
    <description>&lt;P&gt;Hi @Kaniz Fatma​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned in my problem description the file is not getting created only. But if I clear the state of the notebook and check the DBFS dir the file is present. As &lt;/P&gt;&lt;P&gt;I am creating the log file in the notebook and need to upload it to AWS s3 location it has to work how normal python env works. I would recommend using the code I posted to reproduce the issue and fix it from Databrick's side. As other people might also face the same issue in the future. &lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 14:12:44 GMT</pubDate>
    <dc:creator>chandan_a_v</dc:creator>
    <dc:date>2022-06-14T14:12:44Z</dc:date>
    <item>
      <title>logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18114#M11970</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using the logger to log some parameters in my code and I want to save the file under DBFS. But for some reason the file is not getting created under DBFS. If I clear the state of the notebook and check the DBFS dir then file is present. Please let me know if anyone has any idea regarding this. I already tried all possible solutions available on internet but none of them fix the issue. &lt;/P&gt;&lt;P&gt;I have pasted the code below for reproducing the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import logging&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;log_file = f"e.log"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;logging.basicConfig(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;filename="/dbfs/FileStore/" + log_file,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;format="[%(filename)s:%(lineno)s %(asctime)s] %(message)s",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;level=logging.INFO,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;force=True&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__LOG__ = logging.getLogger(__name__)&lt;/P&gt;&lt;P&gt;__LOG__.info("Starting ETL staging pipeline only!")&lt;/P&gt;&lt;P&gt;__LOG__.info("Starting ETL staging pipeline only!")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;display(dbutils.fs.ls("dbfs:/FileStore/"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 11:20:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18114#M11970</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-09T11:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18115#M11971</link>
      <description>&lt;P&gt;@Kaniz Fatma​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any idea regarding this.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 11:21:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18115#M11971</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-09T11:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18116#M11972</link>
      <description>&lt;P&gt;@Kaniz Fatma​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you find any solution? Please let me know. &lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 09:55:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18116#M11972</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-10T09:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18117#M11973</link>
      <description>&lt;P&gt;Perhaps PyCharm sets a different working directory, meaning the file ends up in another place. Try providing a full path.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 10:26:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18117#M11973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T10:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18118#M11974</link>
      <description>&lt;P&gt;Hi @Halen15 Noyes​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am executing the notebook in Databricks. And there we save the file under DBFS.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 10:45:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18118#M11974</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-10T10:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18120#M11976</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I am using 10.4 LTS.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 19:56:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18120#M11976</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-10T19:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18122#M11978</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned in my problem description the file is not getting created only. But if I clear the state of the notebook and check the DBFS dir the file is present. As &lt;/P&gt;&lt;P&gt;I am creating the log file in the notebook and need to upload it to AWS s3 location it has to work how normal python env works. I would recommend using the code I posted to reproduce the issue and fix it from Databrick's side. As other people might also face the same issue in the future. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 14:12:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18122#M11978</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-14T14:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18123#M11979</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update on my request? please fix this issue from your end ASAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandan &lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 06:39:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18123#M11979</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-06-17T06:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: logging.basicConfig not creating a file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18124#M11980</link>
      <description>&lt;P&gt;HI @Kaniz Fatma​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue can be solved by replacing the file handler with a stream handler that contains the string io object. Also please reply to our question when you have some free time. And when someone points out a bug in Databricks it's good to notify the developing team. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandan &lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 07:34:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/logging-basicconfig-not-creating-a-file-in-databricks/m-p/18124#M11980</guid>
      <dc:creator>chandan_a_v</dc:creator>
      <dc:date>2022-07-13T07:34:08Z</dc:date>
    </item>
  </channel>
</rss>

