Wish Make number of lines in Log configurable (or save to disk also)

Discussion in 'Bugs & wishlist' started by Sandman, Jul 10, 2018.

Tags:
  1. Sandman

    Sandman Active Member Licensed User

    I recently needed to catch quite a lot of logs to find an issue, and found that the IDE limits the log to 5000 lines, with no option to increase. Therefore I propose that the Log size can be configurable, to a really high number.

    I do understand that there might be limits to what the Log area can handle though, so for me it would also be super great if one instead could specify a Log directory somewhere. I imagine that each Run from the IDE would create a new log file, named something like <project-name>_<compilation-mode>_<build-configuration>_<datetime>.log.

    Example:
    Code:
    storksaver_Release_Default_20180710_094200.log
     
  2. JohnCody

    JohnCody Well-Known Member Licensed User

    You could also create a new "log" routine that you would use in your projects instead of "Log()".

    For example, I created a "LogEvent" routine:

    Code:
    Sub LogEvent(ErrorEvent as Boolean, EventText as string, DisplayasToast as Boolean, DisplayasMsgBox as Boolean, MsgBoxTitle as string, LogWindow as boolean)
    I call this routine throughout my code so all my diagnostic text goes through this routine and I can choose to either just send it to the log window, display a toast and/or display an MsgBox.

    The routine also adds the eventtext to a file. And when the file gets too big, I rename it to "-00" and create a new file, and then -01 and so on. I set the limit to "-100" so I will have a long history of events to review if needed.

    If you used a routine like this, then you could create a filter in it that would filter out all those extra events and just output the important stuff.
     
    Last edited: Jul 10, 2018
  3. stevel05

    stevel05 Expert Licensed User

  4. Sandman

    Sandman Active Member Licensed User

    Yes, I've received a surprising number of suggestions (not in this thread only) for ways of doing this myself. Thank you all, I am fairly aware of the possibilities of creating a sub and handling logs myself. :) It doesn't really invalidate my Wish for raising the limit of 5000 lines, or having the IDE automatically save the logs to disk. I'd say both are fairly reasonable requests.

    It's nice this is an area where we can create a parallel solution, but it's not really an overly exciting option for me at the moment. I'm just hunting for a rare and annoying bug that rarely shows up. It did show up in the middle of the night, and when I checked the IDE in the morning I realized I got bit by truncated logs (I wasn't aware of the 5000 line limit). So I thought it could warrant the posting of a Wish, for future situations for me and other users.
     
  5. Sandman

    Sandman Active Member Licensed User

    Thanks for the suggestion, but it looks way more complicated than I need. I'd probably just write the logs locally on the device, ssh into it and just tail -f them.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice