getLogger().getHandlers() Help

Discussion in 'Plugin Development' started by sooon_mitch, Apr 23, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    sooon_mitch

    I am trying to use getLogger().getHandlers() to get the consoles output. So it will give me line by line what you see on console. How can I get it and please show an example code. If this is not the way to do it, then how? Please, any help would be the best.
     
  2. Offline

    amhokies

    sooon_mitch It kind of depends on how other plugins implement console output. getLogger().getHandlers() will only return handlers that are associated with that specfic Logger object, so if you're calling it from your plugin's Logger object, it could only be used for your Plugin's console output.
     
  3. Offline

    sooon_mitch

    amhokies Alright. Is their a way to just get whatever is put into console?
     
  4. Offline

    amhokies

    If you wanted to get all the Loggers for all the plugins on the server, you can loop through them and get each of their respective Loggers. I've never really done anything like this before so I'm not 100% certain on the best way to go about this.
     
  5. Offline

    sooon_mitch

    amhokies Can you lead me on the right direction at the least. For instance. How do I even get 1 log from console or so.

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  6. Offline

    Adriani6

    Don't bump after 7 minutes.
     
  7. Offline

    sooon_mitch

    Can you answer my question @Adriani6
     
  8. Offline

    Slikey

  9. Offline

    stink123456

    I dont think it is possible to check for all instances of an object created, you could take a look at the Object class wich they are all childs of but elsewise i have no idea.

    Or again, you could use a logical solution...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    sooon_mitch

    Thank you
     
Thread Status:
Not open for further replies.

Share This Page