Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Application deep logging/traceing

Application deep logging/traceing

Scheduled Pinned Locked Moved C#
debugginghelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nemopeti
    wrote on last edited by
    #1

    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.

    J 1 Reply Last reply
    0
    • N nemopeti

      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.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • J Judah Gabriel 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

        N Offline
        N Offline
        nemopeti
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • N nemopeti

          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

          A Offline
          A Offline
          Alexander Wiseman
          wrote on last edited by
          #4

          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

          N 1 Reply Last reply
          0
          • A 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

            N Offline
            N Offline
            nemopeti
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups