Probably your best bet would be to use an AOP (aspect oriented programming) framework to automatically call tracing code before and after a method execution. A popular choice for AOP and .NET is PostSharp.
More Related Contents:
- Output log using FtpWebRequest
- Logger wrapper best practice
- How can I find the method that called the current method?
- What is the best way to dump entire objects to a log in C#?
- How to print the current Stack Trace in .NET without any exception?
- Log4net rolling daily filename with date in the file name
- How can I log the generated SQL from DbContext.SaveChanges() in my Program? [duplicate]
- Can you configure log4net in code instead of using a config file?
- Write to Windows Application Event Log without event source registration
- Capture username with log4net
- Should I take ILogger, ILogger, ILoggerFactory or ILoggerProvider for a library?
- How to retain callsite information when wrapping NLog
- Trace listener to write to a text box (WPF application)
- How do I do logging in C# without using 3rd party libraries? [closed]
- Use NLog in ASP.NET Core application
- Current possibilities for tracing program flow in C#?
- How performant is StackFrame?
- Serilog – multiple log files
- Log4Net Logging of two different levels to two different appenders for the same logger
- WCF service attribute to log method calls and exceptions
- How I can set log4net to log my files into different folders each day?
- Why do loggers recommend using a logger per class?
- Elegant Log Window in WinForms C#
- Do __LINE__ __FILE__ equivalents exist in C#?
- How do you log the machine name via log4net?
- Can I get parameter names/values procedurally from the currently executing function?
- log4net: Configure to ignore messages from a specific class
- Filter Serilog logs to different sinks depending on context source?
- Logging to an individual log file for each individual thread
- .NET logging framework [closed]