Skip to content

Logging connection state  #716

Closed
Closed

Description

@diomedea

RemoteTech v. 1.8.4. In flight, with both output_log file and the debug console, RemoteTech "spams" a flow of "RemoteTech: Flight: Has Connection: False/True". Doing a coarse measure, about 2 such log messages per vessel with an antenna per second in game (done at 25 FPS, if that is useful).
While I understand all those messages could come useful for debugging RT events with a version under development, they aren't providing but a loss of performance and too large log files to normal users.

I would propose that, if really RT states are that useful, they get recorded on log only when there's a change (for any vessel, going from false to true or the opposite). Even better if the message could tell the actual vessel name (the vessel ID requires users to check against savegame data) and UT of the event.

Activity

  1. KSP-TaxiService commented on Jan 23, 2017

    @KSP-TaxiService
    Contributor

    Hi, can you send your output_log file, please? I need to see the list of your mods installed. I track the message to RT's API which is for third-party mods to use. Under the KSP and RT mod only, this message is not written to either log or debug console because API is not used.

  2. neitsa commented on Jan 23, 2017

    @neitsa
    Member

    Thanks for your report @diomedea !

    Just some notes to add to @KSP-TaxiService answer.

    The incriminated message is here : it's a message from the RT API.

    There's only one reference from RT code to this API, which is in the debug window. This code is only called when you actually push a button (Run button) in the debug window.

    Funny to see that it escaped our tests because it is never called repetitively by RT, which means that one of your mod is actually calling it.

    @KSP-TaxiService / @YamoriYuki : we might consider removing the debug messages altogether from the API if mods tends to call some of them repetitively. Or else provide an option (setting ?) to enable / disable them.

  3. diomedea commented on Jan 23, 2017

    @diomedea
    Author

    Please find here the output_log.
    As correctly guessed, I have many add-ons with that game. Didn't think the log could be started by another.

  4. YamoriYuki commented on Jan 23, 2017

    @YamoriYuki

    @neitsa
    If possible I would just change the log level or something similar, to keep the logging in debug build. Any modder should be able to build his own debug build of RT and use that to observe the log.

  5. diomedea commented on Jan 23, 2017

    @diomedea
    Author

    Thanks for suggestions above. I checked with another KSP 1.2.2 install with only RT 1.8.4 and Kerbalism 1.1.8 (plus Module Manager), that was all it needed for the log spam to show. Therefore believe your API is called too often by Kerbalism. Output_log here.

  6. KSP-TaxiService commented on Jan 24, 2017

    @KSP-TaxiService
    Contributor

    @neitsa , @YamoriYuki
    Looking at the RTLog.cs, I discover this gem where verboseLogging = GameSettings.VERBOSE_DEBUG_LOG;. In other words, there is already the stock-KSP option (General Settings) to disable/enable the verbose logging.

    thissetting

    diomedea, is this option enabled on your side?

  7. diomedea commented on Jan 24, 2017

    @diomedea
    Author

    Sure I had verbose logging on, turned off after you showed me what code produced those messages. Must say I'm almost always using verbose logging to find/document issues, but even with verbose on have logspam only when there is definitely something worth reporting.

  8. KSP-TaxiService commented on Jan 25, 2017

    @KSP-TaxiService
    Contributor

    I am with you, diomedea. In a newly-created branch (rtlog-nerf), I remove those messages that just say the same thing as the functions and pass this commit to other members to review. I leave the remaining logging messages that are meaningful.

  9. added a commit that references this issue on Jan 26, 2017
  10. KSP-TaxiService commented on Jan 26, 2017

    @KSP-TaxiService
    Contributor

    Thanks diomedea for reporting this logging spam. With the suggestion from someone in the team, an additional condition is added to log messages of API and Assembly levels in the debug mode only. This shouldn't show up in a normal mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions