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 206935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:41:26+00:00 2026-05-11T17:41:26+00:00

DOes anyone have any good information with regards to when to log, I was

  • 0

DOes anyone have any good information with regards to when to log, I was thinking of logging an INFO type when i enter each c# method and recording another info when exiting..

Is this considered good or bad? Will i see a performance hit?

If i do record an INFO when i enter a method, the idea would be to record the method name, and all variable and values

Any idea how this can be done automatically without entering each value and name of method, i suppose i could use reflection but maybe i would see a slow down here?

If reflection would slow things down, maybe i could just use the “REFLECTION” bit when there program FAILS hence i can write the stacktrace, all vars, and values.

Any ideas or examples on this really appreciated

Thanks

  • 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-11T17:41:27+00:00Added an answer on May 11, 2026 at 5:41 pm

    You could use the AOP (Aspect oriented programming) style of logging for method-level logging.

    There is a good framework called Log4PostSharp. It’s a plugin to PostSharp which writes to Log4Net

    It basically boils down to decorating your method with an attribute like this:

    [Log(LogLevel.Info, "Doing something")]
    public void CountCharacters() {
       // do your logic here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any good sources of information of using NHibernate with Sql Azure
Does anyone have some good information on the usage of the .SaveChanges() method? I
Does anyone have any good information aside from the Google App Engine docs provided
Does anyone have any good advice or experience on how to create an engine
Does anyone have any good samples, resources, pointers etc. for C# Silverlight with RIA
Does anyone have any pointers to good resources concerning mesh networks? Maybe I'm not
Does anyone have any useful advice/links to information about working with mp3 files in
Does anyone have any good references for designing and implementing an idea I have
Does anyone have any information on the performance characteristics of Protocol Buffers versus BSON
Does anyone have any good references for equations which can be implemented relatively easily

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.