Fork me on GitHub
  August 18, 2018, 08:09:42 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A Proper Statistics / Detailed SQL Log System.  (Read 3709 times)
Kane
Global Moderator
Newbie
*****
Posts: 14


View Profile
« on: November 26, 2010, 02:51:33 pm »

I would like to see preferably not as a plugin that has a slight chance of being broken at time to time a special logging system that has many changeable features. Things like players distance traveled, blocks broken, blocks placed, then the biggest one... (literally log every block broken and or replaced in the game with other detail logging.)

At this point I think on my server the best security wise mode would be the ability to taken a wooden pick axe and hit a spot months later and say Robert owned this land. Let me check Robert if he has been playing. /who Robert oh it says Robert only played for 3 hours in total and last on 3 months ago. I think it's fine if you claim his land.

Also last night we talked about being able to add like a rendering live type thing where maybe you can set a time / stop / start on a test server connect to the database and actually speed the process up like 10-25 times and have the server generate all the changes to the certain time you picked and making recoding movies amazing.


Anyways I personally think this needs to be a feature right into the backbone <3
Logged
nathacof
Newbie
*
Posts: 12



View Profile
« Reply #1 on: November 27, 2010, 01:47:17 am »

I'm actually playing around with this concept already. I've got all the information I need to reliably roll back changes to blocks on the server, all I need to do now is associate an entity id with the changes, and plug a timestamp in an viola, the logging bit is done. However this doesn't log player movements/actions. Tongue

The first feature I want to implement, after getting the basic logging down, is a command to rollback changes based on a players name.

If it works decently well I'll fork the server on github and submit the code for proper peer review.
« Last Edit: November 27, 2010, 01:50:47 am by nathacof » Logged
deoxxa
Administrator
Newbie
*****
Posts: 28


View Profile
« Reply #2 on: November 27, 2010, 02:32:02 am »

I really thing something like this would be best as a plugin, especially if it was to log to MySQL or SQLite or something as that would require us to link to MySQL or SQLite or Postgres or whatever. One of our major goals is to keep the core as minimal as possible and reduce dependencies. Even if 90% of people would use it, the 10% that don't need it shouldn't be forced to.
Logged
Kane
Global Moderator
Newbie
*****
Posts: 14


View Profile
« Reply #3 on: November 27, 2010, 03:03:32 am »

I really thing something like this would be best as a plugin, especially if it was to log to MySQL or SQLite or something as that would require us to link to MySQL or SQLite or Postgres or whatever. One of our major goals is to keep the core as minimal as possible and reduce dependencies. Even if 90% of people would use it, the 10% that don't need it shouldn't be forced to.

I just don't want it to EVER break and always be as efficient as possible. That is why I would have it as a simple disable and enable option. But I mean if the plugin system is that good then it's fine but I would hate to say if I log all blocks that one day I lose like 12 hours of logging because the plugin did not work or something Tongue
Logged
nathacof
Newbie
*
Posts: 12



View Profile
« Reply #4 on: November 28, 2010, 02:39:04 am »

http://codepad.org/B1EJ86DS

So I've got the data needed to rollback changes to the server, hopefully over the weekend I can implement a /rollback <time> [user] command. Perhaps it would also be helpful to have a /log (suggestions for a better name?) command that actually displays the last few actions in chat as well? I don't know if this is something that is up to par with the rest of the code, but if it works I'll be a happy camper! xP
Logged
Andrew
Developer
Newbie
****
Posts: 9


View Profile
« Reply #5 on: November 29, 2010, 06:21:22 am »

I think this is a very good idea for a plugin but I wouldn't really like it put it in vanilla personally as it complicates testing / fixing the base server. Good news is that I wouldn't be hard to write as a plugin. Cheesy
Logged
nathacof
Newbie
*
Posts: 12



View Profile
« Reply #6 on: December 14, 2010, 09:52:51 am »

http://codepad.org/B1EJ86DS

So I've got the data needed to rollback changes to the server, hopefully over the weekend I can implement a /rollback <time> [user] command. Perhaps it would also be helpful to have a /log (suggestions for a better name?) command that actually displays the last few actions in chat as well? I don't know if this is something that is up to par with the rest of the code, but if it works I'll be a happy camper! xP

Finally finished the code for this feature. I'm now able to rollback changes to the server with the following commands:

Code:
# Rollback all changes stored in the binary log
/rollback
# Rolback changes to a specific point in time (epoch)
/rollback <timestamp>
# Rollback changes based on timestamp (epoch) and user nickname
/rollback <timestamp> <nick>

Check it out here, https://github.com/nathacof/mineserver Cheesy Next, to improve performance I am looking into adding indices on timestamp, and timestamp + user nickname.
« Last Edit: December 14, 2010, 09:59:07 am by nathacof » Logged
bakkdoor
Developer
Newbie
****
Posts: 8


View Profile
« Reply #7 on: December 14, 2010, 04:22:51 pm »

pretty cool. will try it out some time later =)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!