Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

two log files in app.config

Posted on by Microsoft Employee

Hi All,

There is any chance to create two econnect log files in one app.config file.

 

Requirement : I am using two databases like companyA and Company B ..

if any exception came in CompanyA database I have to sent log  file in C drive  as well as for  companyB also but log file I have sent in diff Drive…

MY App.config file code:

 

<?xml version="1.0"?>

<configuration>

  <connectionStrings>

    <!--Providing Connection string to CompanyA-->

    <add name="Company1" connectionString="data source=localhost;initial catalog=TWO;integrated security=SSPI;persist security info=False;packet size=4096" />

    <!--Providing Connection string to the TEST Database-->

    <add name="Company2" connectionString="data source=localhost;initial catalog=TEST;integrated security=SSPI;persist security info=False;packet size=4096" />

  </connectionStrings>

  <appSettings>

    <!--Provide File Path to CompanyB-->

    <add key="Company1" value="C:\Program Files (x86)\Microsoft Dynamics\SalesInvoiceImport\CompanyA\"/>

    <!--Provide File Path to the  TEST Database-->

    <add key="Company2" value="D:\CompanyB"/>

    <add key="BatchID" value="WINSYS{0:MMddyy}" />

<-- <add key="ClientSettingsProvider.ServiceUri" value="" />-->

  </appSettings>

  <system.diagnostics>

    <sources>

      <source name="eConnectTraceSource" switchValue="Error">

        <listeners>

          <add name="eConnectTextTracelistener">

            <filter type="" />

          </add>

        </listeners>

      </source>

    </sources>

    <sharedListeners>

       <add initializeData="C:\Program Files (x86)\Microsoft Dynamics\SalesInvoiceImport\Logs\eConnect.log" type="System.Diagnostics.TextWriterTraceListener,&#xD;&#xA;

         System, Version=2.0.0.0, Culture=neutral,&#xD;&#xA;PublicKeyToken=b77a5c561934e089" name="eConnectTextTracelistener">

        <filter type="" />

      </add>

    </sharedListeners>

    <trace autoflush="true" />

  </system.diagnostics>

</configuration>

 

Let me know how am going to give for second econnect log file

Thanks,

Kavitha

 

 

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans