Application deep logging/traceing
-
Hi all! I need some solution, to do a "low level" logging for my application. In teh log, I want to see everything like function calls, strak trace, button events, textbox events.... like the profilers do. Until now, I write my own loging system, and send messages to the logfile by hand like this: Log.LoggThis("Something went ok",LogType.Message); or Log.LogThis("some error occured",exception,LogType.Error); But I think is there a better vay to do this vithout hand coding in every method, and event handler.... If anybody have some idea, please wrote it to me. Thanks, and sorry for my bad english.
-
Hi all! I need some solution, to do a "low level" logging for my application. In teh log, I want to see everything like function calls, strak trace, button events, textbox events.... like the profilers do. Until now, I write my own loging system, and send messages to the logfile by hand like this: Log.LoggThis("Something went ok",LogType.Message); or Log.LogThis("some error occured",exception,LogType.Error); But I think is there a better vay to do this vithout hand coding in every method, and event handler.... If anybody have some idea, please wrote it to me. Thanks, and sorry for my bad english.
nemopeti wrote:
[Rep
Perhaps NLog[^] will suit your needs?
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
nemopeti wrote:
[Rep
Perhaps NLog[^] will suit your needs?
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Messianic Instrumentals (with audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Thank's I alredy know about NLog, and it's a good thing, but it's do the same, like my own loging engine. Nlog write to file, what you want, but you must tell it, what, where, and when. So it isn't automatic, and still ned to write the logging messages into the code. My solution has 3 projects, and a lot of forms, and classes witch have a tonn of functions, and events, so I don't want to write logging procedure for each method... If you ever yuse some profiler, like Ants, or ReSharper yo see te way I like. These pograms need only the target application executable fle, and they listen into the app code, and tell you what happend in where, ad the target application don't need to modyfi. -- modified at 16:59 Wednesday 19th July, 2006
-
Thank's I alredy know about NLog, and it's a good thing, but it's do the same, like my own loging engine. Nlog write to file, what you want, but you must tell it, what, where, and when. So it isn't automatic, and still ned to write the logging messages into the code. My solution has 3 projects, and a lot of forms, and classes witch have a tonn of functions, and events, so I don't want to write logging procedure for each method... If you ever yuse some profiler, like Ants, or ReSharper yo see te way I like. These pograms need only the target application executable fle, and they listen into the app code, and tell you what happend in where, ad the target application don't need to modyfi. -- modified at 16:59 Wednesday 19th July, 2006
I think you can solve this issue by using .NET Reflection. Take a look at this article (TraceListeners and Reflection)[^] - it contains enough to get you started. In the example, the author of the article shows how to log information such as the calling function on the stack and the argument list of that function. He also explains how you retrieve information about the call stack. Hope that helps! Sincerely, Alexander Wiseman
-
I think you can solve this issue by using .NET Reflection. Take a look at this article (TraceListeners and Reflection)[^] - it contains enough to get you started. In the example, the author of the article shows how to log information such as the calling function on the stack and the argument list of that function. He also explains how you retrieve information about the call stack. Hope that helps! Sincerely, Alexander Wiseman
Tank's for the answer! I try to use the refered article, to work out the correct solution. -- modified at 3:37 Thursday 20th July, 2006 I checked the article, its good, but isn't do what I want. This type of logging stil need to be modyfy the target program. I need solution to log a program/process without modifying it's code...