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. Windows Forms
  4. smart logger window

smart logger window

Scheduled Pinned Locked Moved Windows Forms
visual-studiodesignhelptutorialquestion
4 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.
  • I Offline
    I Offline
    IWannaTalk
    wrote on last edited by
    #1

    hi all! i need to develop application that have many simultaneously ran tasks. each task have its own logger file and prints log info in to some window control. i've tried to investigate how to log this data to UI window but found out nothing. i need some multiline listbox or textbox that can contain a lot of strings and be fast like VS output window(text box) or microsoft spy(listbox). i think that containing of all log lines in UI window is not a good idea... may be it would be better to write all log data only to log file and in to UI window print lines depending on scroll-bar position reading them from log-file? what do u think about this? may be u had the same problem and can recommend me better solution? 10x!

    ISQ 469907496

    L 1 Reply Last reply
    0
    • I IWannaTalk

      hi all! i need to develop application that have many simultaneously ran tasks. each task have its own logger file and prints log info in to some window control. i've tried to investigate how to log this data to UI window but found out nothing. i need some multiline listbox or textbox that can contain a lot of strings and be fast like VS output window(text box) or microsoft spy(listbox). i think that containing of all log lines in UI window is not a good idea... may be it would be better to write all log data only to log file and in to UI window print lines depending on scroll-bar position reading them from log-file? what do u think about this? may be u had the same problem and can recommend me better solution? 10x!

      ISQ 469907496

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, most of the time I log to both a file (which during debug gets opened and closed for each line, so I also catch the last line before a crash) and a listbox. IMO a TextBox is terrible for logging, since it continuously concatenates all text lines, a quadratic and expensive operation you do not need. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      I L 2 Replies Last reply
      0
      • L Luc Pattyn

        Hi, most of the time I log to both a file (which during debug gets opened and closed for each line, so I also catch the last line before a crash) and a listbox. IMO a TextBox is terrible for logging, since it continuously concatenates all text lines, a quadratic and expensive operation you do not need. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


        I Offline
        I Offline
        IWannaTalk
        wrote on last edited by
        #3

        thx!

        ISQ 469907496

        1 Reply Last reply
        0
        • L Luc Pattyn

          Hi, most of the time I log to both a file (which during debug gets opened and closed for each line, so I also catch the last line before a crash) and a listbox. IMO a TextBox is terrible for logging, since it continuously concatenates all text lines, a quadratic and expensive operation you do not need. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


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

          Luc Pattyn wrote:

          IMO a TextBox is terrible for logging, since it continuously concatenates all text lines, a quadratic and expensive operation you do not need.

          Interesting, never thought of that bottleneck right there, going to make me review a couple of times a textbox is present for debugging :)

          Check out the CodeProject forum Guidelines[^]

          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