[REQ] Bukkit Log Web Viewer

Discussion in 'Archived: Plugin Requests' started by xeon927, Dec 20, 2011.

  1. Offline

    xeon927

    I was laying in bed last night when I had an idea. I was wanting to have a webpage that could parse the Bukkit logs and sort by various rules.

    This doesn't necessarily need to be a plugin, but for those without an already existing web server, it could be a bit tricky to set up.

    I was thinking of having a plugin that has it's own small, inbuilt web server that would run on anything other than the standard port (80). Say, I could go to my website on port 9994 (or whatever port would be specified in the configuration) and get to a web interface that shows the current server log.

    It would have different sorting options, so buttons, or links or something (near the top of the page) that, when clicked, would change the display of the server log (bottom 3/4 of page) to only show particular items.

    Possible sort options could be:
    • Date/Time
    • Plugin (Because plugins generally include a name beforehand (eg. [LogBlock]))
    • Player Joins/Parts
    • Chat (Plus sort by particular user)
    • [INFO] Messages
    • [WARNING] Messages
    • [SEVERE] Messages
    • Player Kicks/Bans (On my server, allow-flight is set to false, so people get automatically kicked. This option would make it easier to isolate these events from the rest of the log
    • Anything else that any possible developer would be interested in adding
    I was taking a look on the web last night when i originally had this idea, and I saw one person that said just to use an online text file parser. I wouldn't be wanting just any text file parser. I would be wanting one that is specific for Bukkit server logs.

    Hopefully somebody could be kind enough to help me out with this plugin.

    Thanks in advance,
    -xeon927
     
  2. Offline

    Hugo mass

    This could be so awesome !
     
  3. Offline

    xeon927

    One of my friends has suggested coding the entire thing in Perl. He refuses to do it, however, for reasons that are unknown.

    Anyone around on the Bukkit forums that knows how to code in Perl (in fact, any language that can be used via web interface) and has a bit of free time on their hands to help me (and I'm sure quite a few other people) out with making this plugin?

    Any other supporters would also be welcomed so that we can make this log viewer a reality.
     
  4. Offline

    Waterflames

    Basic log displaying wouldn't be to hard, but having the interface actually know which output comes from what plugin would be way harder and possibly require a custom craftbukkit + custom versions of the plugins.
     
  5. Offline

    xeon927

    Well, I was thinking, what about having configuration files for the webpage aspect, and the end user specifies the labels and prefixes (like [LogBlock] at the beginning of a log line) and what plugin they link to.

    Then also have basic ones that are the same all the time. Such as player joins/parts/kicks/chat or other things. Then also probably filter by date/time if possible (Because all log entries have the date/time at the beginning).

    If none of this makes sense, then that's probably because I'm half asleep at the moment. Basically, the user tells it what to look for, the webpage/plugin reads the entire log, and then filters those items out and just shows them (User selects what view to look at).

    ...if that makes sense...
     
  6. Offline

    Hugo mass

    Yeah, even a basic display would be great. Because every time i must start my FTP program, and download my server.log, which is quite annoying.
     
  7. DrAgonmoray likes this.
  8. Offline

    DrAgonmoray

    I was gonna post that, but I see you've beaten me to it.
     
  9. Offline

    nickrak

    Code:
    apt-get install apache2
    ln -s /bukkitfolder/server.log /var/www/server.log
    Open web browser, "http://servernamehere/server.log". There is no reason to overcomplicate this with a plugin.

    If you need to add additional functionality, just create a php page with the buttons you need and run scripts using php's exec command.

    A simple php page can do the filters the OP listed.
     
  10. Offline

    xeon927

    Just to ask, you wouldn't know PHP would you? And if so, do you reckon you could help me with making that page?
     
  11. Offline

    nickrak

    Yes, and with some thought, I've just realized it could probably be done way better looking with AJAX. Is there anything you want other than what was listed above?
     
  12. Offline

    xeon927

    Hmm... Probably not all that much other than in the original post.

    However, would it be at all possible to add some form of config file that you can specify filter names, and text to look for in each line?

    I use LogBlock on my server (as you may have figured out, seeing as I mention it a fair bit), and would like a filter just for it. So to tell the page what to look for in filtering, you could have a config file, with maybe the following:
    filtername="Text to find"​
    So in the case of LogBlock, it would be something like this:
    LogBlock="[LOGBLOCK]"​

    If it is a bit difficult to implement that, that would be ok. I could probably live without it. But I'll see what you can get. And other than that, and the stuff in the original post of mine, that should be about it.

    Thanks for the help.
     
  13. Offline

    xeon927

    Sorry for bumpin', but is anybody working on this by any chance?
     
  14. Offline

    nickrak

    I'm working on it in my spare time, which isn't much between moving and work. It's mostly done though.
     
  15. Offline

    Aetherspawn

    Do as nickrak suggested with the symbolic link then just have a page that loads the information using an AJAX query to the server.log, sorts it by using Regex (or reading its tag); then uses jQuery for some fancy ways to display the information.
     
  16. Offline

    xeon927

    nickrak: Sweet! Thanks for that. The page shall help my quite a bit, I'm quite sure.

    Aetherspawn: I already knew how to make Symbolic Links in Unix, however, this isn't what I'm after. I can read the logs just fine, however, I was wanting something to actually separate the different elements from each other (Refer to my original post for more info on that). Symbolic Links wouldn't help me at all, seeing as I can basically SSH into my computer from anywhere in the world and view them then and there.
     
  17. Offline

    Aetherspawn

    That's why... I... explained... I don't even...

    [​IMG]
     
  18. Offline

    Lolmewn

    With spacebukkit you can :)
     
  19. Offline

    xeon927



    Oh yeah, that's what I forgot to mention...

    I have no clue about coding webpages to do things like I was wanting. That was the main purpose of my reply, but I seem to have forgotten the most important part...

    :p
     
  20. Offline

    Aetherspawn

    Lol, gotcha.

    /Bump
     

Share This Page