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

  • Home
  • SEARCH
  • 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 262583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:31:40+00:00 2026-05-11T22:31:40+00:00

I’m interested at what stage in your development do add logging and/or tracing to

  • 0

I’m interested at what stage in your development do add logging and/or tracing to your applications?

I’m working with a .Net stack and log4net (via commons.logging). Generally taking a TDD approach to development although admittedly not 100%, sometimes Im know to spike out without test coverage. My application all sit server-side, e.g. web services, windows service that consume messages off a bus, asp.net mvc business admin apps. etc..

I found myself decorating methods in my applicatiosn services with descriptive logger.INFO “Getting cakes from repository” . some work .. “Got 5 cakes from repository. “, and then an unhandled expcetion handler for the app doamin to logger.FATAL for unexpected excpetions that bubble up.

However I usually end up going back and applying these near the end of development rather than at the start of development and I might have a dozen or two only. I find I rarely decorate any lower level classes such as implementation of ICakeRepository with logger stuff as it seems pointless.

For tracing, which switched on via config, I’m thinking of intercepting method calls and instance creation using the IOC framework, and this should take care of on-site troublehsooting rather than heavy trace population.

  • 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-11T22:31:40+00:00Added an answer on May 11, 2026 at 10:31 pm

    My software is in layers, with a well-defined API between each layer. I tend to implement logging for those APIs from the begining, so that for any given transaction I can see how that results in an API call at each of the underlying layers: if there’s a mistake, that will help to narrow it down to a specific layer. The logging will also help to reproduce a problem by showing a log of all the previous, normal activity which led up to the problem.

    I also add assertions within each layer where I can, and log assertion failures.

    A log file therefore often shows of a sequence of calls to the public APIs, with an error message generated from inside: that’s often enough to diagnose the problem.

    Beyond that, I add debug-level logging on an as-needed basis: to debug specific problems during development and/or after release.

    My reasoning for caring about logging is partly explained in the following:

    • Separate ‘debug’ and ‘release’ builds?
    • Should one test internal implementation, or only test public behaviour?

    To fix any bug in released software, I depend on the log file; and the same is also often true of software as it’s being developed.


    You said,

    I find I rarely decorate any lower level classes such as implementation of ICakeRepository with logger stuff as it seems pointless.

    I said,

    My software is in layers, with a well-defined API between each layer. I tend to implement logging for those APIs from the begining …

    I think I’d better explain what I mean by “layers”, which may or may not be the same as your “lower level” classes.

    For example, my system might have the following layers:

    • UI
    • Business layer (rules for manipulating data)
    • Data access layer (for database I/O)
    • Database

    In that case I would have the following interfaces or APIs, which might deserve logging:

    • Between the user and the UI (i.e. the UI events, mouse and keyboard)
    • Between the UI and the business layer (see “Humble dialog box”)
    • Between the business layer and the DAL
    • Between the DAL and the database

    Alternatively the system might be a chain of components connecting two peer end-points (less obviously with “top” and “bottom” layers).

    In any case, what I’m logging is the API that’s each component’s public facade, which is good for logging for several reasons:

    • Not too complicated (the facade tends to be simpler than the underlying/internal implementation)
    • Good coverage (if I log the whole facade, and if the only way into the component is via its facade, then I know I’ve logged everything that goes into the component)
    • Works well with Conway’s Law: when debugging a system with multiple components, each developed by a different team, one of the recurrent questions is, “Which component is at fault, and therefore which team needs to debug it?”
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 257k
  • Answers 257k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How about jQuery.timepickr. May 13, 2026 at 10:50 am
  • Editorial Team
    Editorial Team added an answer According to The SVN Book, this should be as simple… May 13, 2026 at 10:50 am
  • Editorial Team
    Editorial Team added an answer You'll need to query the subtables and send back the… May 13, 2026 at 10:50 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.