Asp. NET how error logs are logged

Source: Internet
Author: User
Tags msmq

The program logs the error log as something that seems to be of little use to the average user, but is very useful to program developers, and it can detect errors or unusual procedural signs. So what are the common ways to log error logs?

In most cases, the use of

1, directly recorded as Txt/xml file

2. Windows Event Log

Other ways to log error logs

1. Local queue of the current process

Without a simple and efficient persistence mechanism implementation, the efficiency of a single call is reduced

2. MSMQ

(1), non-in-process Message Queuing, single call speed, no process internal local queue fast

(2), built-in persistence mechanism, even down the machine, the information will not be lost

(3), can simply start a number of consumer programs to consume the queue elements, the scalability of strong

3. WCF services in a standalone process (interprocess pipelines)

(1), the persistence mechanism depends on the WCF service implementation way, needs to implement itself

(2), named pipe communication between processes on the local machine, faster than network traffic (e.g. Msmq,service broker, database)

4. WCF services in a standalone process (asynchronous invocation mode)

(1), unfortunately unable to use named pipes

(2), there is communication on the network, the speed is reduced

5. Database

Note: The log database cannot be merged with the business database, otherwise it will affect each other (high concurrency)

6. Service Broker for SQL Server

7. MongoDB (or similar NoSQL database)

(1), has the persistence mechanism

(2), fast

(3), if the recorded log needs to have a query function, this choice is best

(4), does not affect the performance of the business database

Asp. NET how error logs are logged

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.