Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

two log files in app.config

(0) ShareShare
ReportReport
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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans