Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 231831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:57:58+00:00 2026-05-11T19:57:58+00:00

I finishing up a web application and I’m trying to implement some logging. I’ve

  • 0

I finishing up a web application and I’m trying to implement some logging. I’ve never seen any good examples of what to log. Is it just exceptions? Are there other things I should be logging? What type of information do you find useful for finding and fixing bugs.

Looking for some specific guidance and best practices.

Thanks

Follow up

If I’m logging exceptions what information specifically should I be logging? Should I be doing something more than _log.Error(ex.Message, ex); ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:57:58+00:00Added an answer on May 11, 2026 at 7:57 pm

    Here is my logical breakdown of what can be logged within and application, why you might want to and how you might go about doing it. No matter what I would recommend using a logging framework such as log4net when implementing.

    Exception Logging

    When everything else has failed, this should not. It is a good idea to have a central means of capturing all unhanded exceptions. This shouldn’t
    be much harder then wrapping your entire application in a giant try/catch unless you are using more than on thread. The work doesn’t end here
    though because if you wait until the exception reaches you a lot of useful information would have gone out of scope. At the very least you should
    try to collect specific pieces of the application state that are likely to help with debugging as the stack unwinds. Your application should always be prepared to produce this type of log output, especially in production. Make sure to take a look at ELMAH if you haven’t already. I haven’t tried it but I have heard great things

    Application Logging

    What I call application logs includes any log that captures information about what your application is doing on a conceptual level such as “Deleted Order” or “A User Signed On”. This kind of information can be useful in analyzing trends, auditing the system, locking it down, testing, security and detecting bugs of coarse. It is probably a good idea to plan on leaving these logs on in production as well, perhaps at variable levels of granularity.

    Trace Logging

    Trace logging, to me, represents the most granular form of logging. At this level you focus less on what the application is doing and more on how it is doing it. This is one step above actually walking through the code line by line. It is probably most helpful in dealing with concurrency issues or anything for that matter which is hard to reproduce. You wouldn’t want to always have this running, probably only turning it on when needed.

    Lastly, as with so many other things that usually only get addressed at the very end, the best time to think about logging is at the beginning of a project so that the application can be designed with it in mind. Great question though!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just finishing off a mobile web application for a client. I have
I am just finishing web application for picture analysis and inpainting. And I need
I am just putting some finishing touches onto a Licensing solution for a Web
We are finishing up our web application and planning for deployment. Very important aspect
I'm just finishing a web page for our sales guy to quickly go through
I am currently finishing a web page in php. Basically there is some data
Description: On a C# ASP.Net web application, we have implemented some timers to periodically
I was trying to build a more sophisticated lockout mechanism for a web application.
Just finishing up the development of a site, but what would website development be
I'm finishing up the Core Data tutorial, and it suggests trying to convert to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.