{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1802","repository_url":"https://api.github.com/repos/KSP-CKAN/CKAN","labels_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1802/labels{/name}","comments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1802/comments","events_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1802/events","html_url":"https://github.com/KSP-CKAN/CKAN/issues/1802","id":162504653,"number":1802,"title":"Debug Logging Integration with KSP through a Plugin","user":{"login":"ferram4","id":6935754,"avatar_url":"https://avatars.githubusercontent.com/u/6935754?v=3","gravatar_id":"","url":"https://api.github.com/users/ferram4","html_url":"https://github.com/ferram4","followers_url":"https://api.github.com/users/ferram4/followers","following_url":"https://api.github.com/users/ferram4/following{/other_user}","gists_url":"https://api.github.com/users/ferram4/gists{/gist_id}","starred_url":"https://api.github.com/users/ferram4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferram4/subscriptions","organizations_url":"https://api.github.com/users/ferram4/orgs","repos_url":"https://api.github.com/users/ferram4/repos","events_url":"https://api.github.com/users/ferram4/events{/privacy}","received_events_url":"https://api.github.com/users/ferram4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-06-27T17:26:36Z","updated_at":"2016-06-29T15:26:06Z","closed_at":null,"body":"**TL;DR:** Create a KSP plugin to print a bunch of debug info to the log at startup to establish the state of the CKAN install for modder convenience.  Have this automatically installed in every CKAN install.  This should (I think) be much quicker to create, implement and maintain than #1797, but won't replace that.\r\n\r\nCoding this should be pretty simple on the KSP side.  I've already offered to do most of the work on that myself elsewhere, and @linuxgurugamer has already offered to help as well.  However, since this code will be basically baby's first Part-less KSP plugin, any CKAN contributors / devs with any interest in getting into KSP modding should jump in.\r\n\r\n### Rationale\r\n1. Provides more info to modders when debugging CKAN installs, likely can help detect metadata errors right there, and works within the current support setup that already exists.\r\n2. Putting the info in KSP's debug log means that users don't have to do anything more than provide the logs modders already ask for.\r\n3. Allows some robustness in detecting CKAN issues for users that go around established procedures, whether they come from #1797 or elsewhere.\r\n\r\n### Specs\r\nOn the CKAN side, all the information should end up placed in a text file somewhere within the CKAN directory for easy reading.  I don't know the details of this, so someone more experienced should weigh in; this may require no changes or some minor ones at all.  There will also need to be some method for getting it installed.\r\n\r\nOn the KSP side, the idea is pretty simple a single dll put in the GameData directory like any other plugin.  Functionally, start instantly in the loading menu (similar to ModuleManager), read information from config file, print to the KSP log the first frame, destroy the class that did this, do nothing for the rest of the game.  Simple, easy, clean.\r\n\r\nSuggested things to print, I'm sure others have ideas:\r\n1. CKAN version\r\n2. Mods installed and their versions\r\n3. Whether mods were installed via CKAN or autodetected\r\n4. What repo the mod's metadata came from and if it is the official source (CKAN-meta or an author's repo)\r\n5. If KSP's version matches the KSP version that CKAN detected (find BuildID.txt and Readme.txt shenanigans) and what those are.\r\n\r\n### Plugin Maintenance\r\nWith a KSP plugin comes the risk of it breaking every KSP update.  Fortunately, the risk that this happens drops tremendously the less the plugin interacts with parts of KSP; as envisioned above, this plugin only works with KSP-specific code in 1 place (the entry point) and then works solely with the Unity game engine, which is far more stable codewise.  I expect that no changes will be necessary for compatibility between KSP versions and that at worst only recompiles will be necessary.\r\n\r\n### Further Questions\r\n1. What do we call it?  This will exist within the GameData directory like any other mod and needs to be distinct.\r\n2. How should it be installed and what options should users get here?  Using it as a universal dependency seems disingenuous.  How should users be informed that it's going to be there and do nothing but add a bit of stuff to the log?\r\n3. License for this thing?  It is a separate plugin, so perhaps a different license than CKAN itself is ideal."},"comment":{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/comments/229392190","html_url":"https://github.com/KSP-CKAN/CKAN/issues/1802#issuecomment-229392190","issue_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1802","id":229392190,"user":{"login":"Blu3wolf","id":12153041,"avatar_url":"https://avatars.githubusercontent.com/u/12153041?v=3","gravatar_id":"","url":"https://api.github.com/users/Blu3wolf","html_url":"https://github.com/Blu3wolf","followers_url":"https://api.github.com/users/Blu3wolf/followers","following_url":"https://api.github.com/users/Blu3wolf/following{/other_user}","gists_url":"https://api.github.com/users/Blu3wolf/gists{/gist_id}","starred_url":"https://api.github.com/users/Blu3wolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blu3wolf/subscriptions","organizations_url":"https://api.github.com/users/Blu3wolf/orgs","repos_url":"https://api.github.com/users/Blu3wolf/repos","events_url":"https://api.github.com/users/Blu3wolf/events{/privacy}","received_events_url":"https://api.github.com/users/Blu3wolf/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T15:26:06Z","updated_at":"2016-06-29T15:26:06Z","body":"Having the program take an action the user isnt expecting is a great way to alienate your users. \r\n\r\nWould be best as a default, but one the user can opt out of, without it going ahead and making changes to the users install without it being told to. "}}
{"actor":{"display_login":"Blu3wolf"}}