1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Solved [Console] Plugin Debug Mode

Discussion in 'Bugs & Feature Requests' started by Sp0ng3b0b, Jun 23, 2013.

  1. Hello,

    How about a feature in the Spigot.yml that adds a Prefix in front of every Consoleline that indicates what Plugin(jar?) is printing the line. Some lazy plugin authors sometime forget to add their Pluginname, and then im unable to locate the cause of some errors.

    How it could look like:

    Note: If possible, remove [Pluginname] from the printed line, to prevent duplicates.

    Old:
    Code (Text):

    2013-06-23 17:47:08 [INFO][War] Warhub ready.
    2013-06-23 17:47:08 [INFO]
    2013-06-23 17:47:08 [INFO] **************************************************
    2013-06-23 17:47:08 [INFO] ----------------- PAINTBALL INFO -----------------
    2013-06-23 17:47:08 [INFO]
     
    New:
    Code (Text):

    2013-06-23 17:47:08 [War.jar|INFO] Warhub ready.
    2013-06-23 17:47:08 [Paintball.jar|INFO]
    2013-06-23 17:47:08 [Paintball.jar|INFO] **************************************************
    2013-06-23 17:47:08 [Paintball.jar|INFO] ----------------- PAINTBALL INFO -----------------
    2013-06-23 17:47:08 [Paintball.jar|INFO]
     





    Another Reason: Some times, without a reason this line pops up and i have no clue what it means to me.
    Code (Text):
    2013-06-23 17:52:07 [SEVERE] [Fatal Error] :6:3: The element type "hr" must be terminated by the matching end-tag "".
     
    • Agree Agree x 3
  2. joehot200

    Supporter

    • Like Like x 1
  3. md_5

    Administrator Developer

    Already is, plugins just need to use plugin.getLogger()
     
    • Like Like x 1
  4. Yes i know, but some dont, and it would be awesome to have, sometimes its not clear what plugin logs what. And as a server admin its a pain in the *** to find the plugin causing it.
     
  5. +1 For this, by default, on every plugin without the plugin developer adding plugin.getLogger() in.
     
    • Agree Agree x 2
  6. Is it really that hard to ask the plugin developer(s) to just add this in themselves?
     
  7. Not really, but its handy when you get the odd stray plugin bugging out, and you dont have the time to debug which one it is.
     
    • Agree Agree x 1
  8. Stacktraces aren't that hard to read.
     
  9. joehot200

    Supporter

    True, but its a thing of getting the hang of what to look for. Took me a while :p
     
  10. I know, im developing Java for 3 years now, but im just asking for it because sometimes there arent even stack traces just strange messages and there is no fast way of finding out what plugin is printing that. Yes you can half the plugins and reload and so on but with 50 plugins this isnt very fast :S
     
  11. libraryaddict

    Patron

    Can you tell us how we are going to find out what plugins are printing the message?
     
  12. I think this would be possible by getting a stack trace, getting the class that called it, and getting the jar file from the class.
    Only hard part of it I'd think would be determining what class in the stack trace is responsible for actually sending the message, ignoring the logger classes. I also wouldn't know how to edit the log message but that shouldn't be to hard.

    This could even be done by a plugin I believe, adding a log handler to spigot's main logger like some log filtering plugins do.
     
    • Winner Winner x 1