Sync Service for ADO. NET program debugging-use Tracing to generate logs (Data Synchronization logs) [DEVICE]

Source: Internet
Author: User

The principle of debugging on Device and Desktop is the same, but the configuration file is different, the first time to read this article of friends, please refer to [Desktop]: http://www.cnblogs.com/liangyiming/archive/2009/04/01/1427388.html

 

Tracing works the same as Desktop on Device, but the configuration method is slightly different.

Because the Sync Service for ADO. NET Based on WinCE does not publicly declare that it supports Tracing production logs, configuration in App. config is ineffective. The correct configuration method is as follows:

  1. On the WinCE platform, create a configuration file named trace.config.txt.
  2. Put this file in the directory of your EXE program (very important !)
  3. Then add the following content to the configuration file:
<?xml version="1.0" encoding="utf-8" ?><configuration>   <traceSettings>     <add key ="FileLocation" value="test.txt"/>     <add key ="LogLevel" value="4"/>   </traceSettings></configuration>

After the program is run, the Tracing Log is generated.

 

Note the following two points:

  • Make sure that your trace.config.txt and your EXE program are in the same directory, otherwise logs will not be generated. An empirical method is to add trace.config.txt to your VS soltuion. in this case, trace.config.txt will automatically Deploy to the Device when deployment.
  • If you do not specify the path of the Log file, it is put into the ROOT directory of the Device by default.

 

Related information:

  • Http://msdn.microsoft.com/en-us/library/cc807160.aspx

 

  • Author: Liang yiming
  • Source: http://liangyiming.cnblogs.com
  • The copyright of this article is owned by the author. You are welcome to repost this article. However, you must keep this statement without the author's consent, and provide the author's name and original text link clearly on the article page. Otherwise, you will be held legally liable.

     

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.