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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:12:36+00:00 2026-05-27T18:12:36+00:00

Yesterday i implement Log4Net in my application. To use it i need to write

  • 0

Yesterday i implement Log4Net in my application.

To use it i need to write

 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);


 log4net.Config.XmlConfigurator.Configure();
 log.Debug("My function called");

Problem:

I need to log every function of my project.

Whether there is some setting that i can use to log all function calls without need to right log.Debug() always as i need to track only function name and don’t need any message.

Any help is appreciated

  • 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-27T18:12:36+00:00Added an answer on May 27, 2026 at 6:12 pm

    What you are trying to do is called “Aspect Programimg” – attaching new code to some points inside already written and compiled code. There is no built-in aspect features in C# so you have to use framework like PostSharp. More here:

    Aspect Oriented Programming in C#

    You need to attach your logging code before and after each method invocation. Mind that it will decrease performance dramatically, and the logs will grow really fast.

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

Sidebar

Related Questions

I have a Django application in which I need to implement a simple trending/ranking
Yesterday I thought it would be nice to implement my own Trigger in a
Yesterday I was trying to implement a Listener for a SelectManyListbox using Ajax in
Yesterday, after about two years we re-deployed our application. Code hasn't changed, but the
I need to implement a bag data structure using the interface java.util.Collection . I'm
Yesterday, I decided to convert my application from LINQ-to-SQL to EF4 to take advantage
Yesterday I've got a task to implement a validation on the field where user
Going on from my question yesterday, I need to know the way to approach
Need a few infos please regarding the communication of a Java web application via
Yesterday I had the need for a matrix type in Python. Apparently, a trivial

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.