Nlog Inserting database exception handling

Source: Internet
Author: User

Just contact Nlog, according to the online database set up Nlog found dead or alive plug in! But the log file recorded at the same time is successful, and the code runs without error . Tried the various configuration formats and methods on the net, all useless! Helpless can only go to the official git find the answer, determine the configuration format and parameters are no problem, feel into a dead end! There is no way to find the answer in git issues, even if there is no same situation!!! Helpless, and return to Nlog.config to look carefully at the default comment! Discover two nodes in a sudden! Such as! Heart 10,000 grass mud horse in the Pentium, I said how will always run and not error , the original throwexceptions to turn off!!! The next internalloglevel is also off, the node literal meaning understanding is nlog own log, the back of the Internallogfile is the path of logging! Finally set the throwexceptions to on after a running system finally error, it is the table field length is not enough of this low-level error! It took me nearly two hours to get this little problem out of my hand.
Note that the value of internalloglevel here is the same as the log level defined in Nlog, as follows:

    • name -Render the full level name.
    • Firstcharacter -Render The first character of the level.
    • Ordinal -Render The Ordinal (aka number) for the level.

Level
Firstcharacter Ordinal
Trace T 0
Debug D 1
Info I 2
Warn W 3
Error E 4
Fatal F 5
Off O 6

Nlog Insert Database exception handling

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.