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 Info and Error logging

Application Info and Error logging

Scheduled Pinned Locked Moved C#
questionperformancehelp
7 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,

    ASCII stupid question, get a stupid ANSI

    L N B K 4 Replies Last reply
    0
    • L Lost User

      I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,

      ASCII stupid question, get a stupid ANSI

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Collin Jasnoch wrote:

      Anyone done any speed comparisons in getting the info to file or the Event Logs?

      Never done so; logging an exception is something that happens exceptionally, not every second. The EventLog is not the right place if you're logging a lot of traffic, but it is the right place to report problems to the SysAdmin of that network. I think that you shouldn't be checking whether it's "speedy" enough, but rather if you can easily get all the information from it that you need. The fact that one can read an EventLog remotely doesn't matter much to me, as one can do the same with a simple text file.

      I are Troll :suss:

      L 1 Reply Last reply
      0
      • L Lost User

        I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,

        ASCII stupid question, get a stupid ANSI

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        Never had reason to test it, but I'm quite confident that speed is not an issue. I'd use a framework such as the Microsoft Enterprise Library Exception Handling Block and Logging Application Block to give you the flexibily to change where and how you store such information if an issue does arise with one method.


        I know the language. I've read a book. - _Madmatt

        1 Reply Last reply
        0
        • L Lost User

          Collin Jasnoch wrote:

          Anyone done any speed comparisons in getting the info to file or the Event Logs?

          Never done so; logging an exception is something that happens exceptionally, not every second. The EventLog is not the right place if you're logging a lot of traffic, but it is the right place to report problems to the SysAdmin of that network. I think that you shouldn't be checking whether it's "speedy" enough, but rather if you can easily get all the information from it that you need. The fact that one can read an EventLog remotely doesn't matter much to me, as one can do the same with a simple text file.

          I are Troll :suss:

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Eddy Vluggen wrote:

          The EventLog is not the right place if you're logging a lot of traffic

          So what would be the right place?

          ASCII stupid question, get a stupid ANSI

          L 1 Reply Last reply
          0
          • L Lost User

            I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,

            ASCII stupid question, get a stupid ANSI

            B Offline
            B Offline
            Bardy85
            wrote on last edited by
            #5

            Lookup TracerX. Very good at logging Messages/Exceptions. You can also set the level of the logs.

            1 Reply Last reply
            0
            • L Lost User

              Eddy Vluggen wrote:

              The EventLog is not the right place if you're logging a lot of traffic

              So what would be the right place?

              ASCII stupid question, get a stupid ANSI

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Collin Jasnoch wrote:

              So what would be the right place?

              For a lot of traffic, I'd go for a textfile and import that into a database. Easy to zip & mail, and appending text to a file doesn't cost much cpu-time. This is ideal for logging lots of data, as you can simply dump it without much ado. It would also be the best place to hide your exceptions from the customer if you wanted to - you can encrypt the string before writing it. The EventLog would be the ideal place for exceptions, and general diagnostic events. Things like starting a service, or registering a new license.

              :suss:

              1 Reply Last reply
              0
              • L Lost User

                I was wondering if anyone knows some timming on how best to store application info and exceptions. I had never used the Windows Event logger and was looking at it. Quite simple to use. We have an app that currently logs everything to a CSV file for info and exceptions are logged to a txt file. Anyone done any speed comparisons in getting the info to file or the Event Logs? Thank you,

                ASCII stupid question, get a stupid ANSI

                K Offline
                K Offline
                Keith Barrow
                wrote on last edited by
                #7

                Log4Net provides a good way of performing the logging you need. The speed has allways been more than adequate for my purposes. The Log file can be configured in the app.config file and can be sent to single or multiple destinations (event log, database, text file etc), and what is logged is customisable. Log4Net is also fail-safe (ie almost never throws and error that stops your code), which is good for trace and error logging. Logging is not guaranteed (due to the fail-safe nature, a failure results in no message) and is therefore no good for audit requirements, but once you have it is configured and tested, I've not seen a message missed so it is pretty reliable.

                CCC solved so far: 2 (including a Hard One!) 37!?!! - Randall, Clerks

                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