WatchFox
WatchFox
No one can outfox a fox
WatchFox is an extremely fast and efficient logging plugin that uses its own custom, self-hosted database to achieve the fastest speeds of any logging plugin yet. Just drop the jar in the plugins folder and you'll be logging at multi-thousand actions per second.
Links: Downloads | API Info | Changelog | How to use | What it logs | Configuration | Permission nodes | Saving | How it works | Test details | Report a bug | Validation
WatchFox was developed in my quest for a superior logging plugin. Since none of the ones currently available appealed to me, I wrote my own. (Of course, this also means I wrote all the documentation myself. If it's a little thick, don't worry, the defaults are perfectly fine, there's just room for tweaking.)
A significant consideration was that most logging plugins required a MySQL database. While many hosts offer such a server now, in my experience, they were unreliable and over-provisioned. Many could not keep up with even a modest server. Additionally, running MySQL on a self-hosted server adds a large amount of overhead, both to the server and the admin. WatchFox avoids all of this by running the database internally to the plugin, with intelligent caching and minimal I/O.
There are also other logging solutions that don't use a MySQL server. However, WatchFox vastly outperforms them. In a self-conducted test (I encourage you to test for yourself if you don't believe me), WatchFox was many times faster, and uses significantly less storage space to store data.
Important tidbits:
- WatchFox is coded in Java 1.7 and requires a Java 7 JRE / runtime to function.
- WatchFox throttles rollbacks to 1000 blocks per second reduce server lag. If you have power to spare, you change this rate in the configuration. See conf.
Naturally, WatchFox has its own set of unique advantages and disadvantages over other plugins. Some notable ones follow:
+NO NMS CODE Confidently use WatchFox on any 1.4.5R1.0+ server.
+No need for a MySQL server
+Fastest Bukkit logger available
+Full search syntax, not restricted to using tools
+Full WorldEdit selection usage support
+Powerful API for other plugins
+Chest inventory rollbacks
+Easier to setup than alternatives
+Rollback preview support
+Ability to keep database in sync with Minecraft world (see saving for details)
+Unique anti-overwrite technology (see below)
+Shift-click to add blocks to your search!
+Ability to sort your search results at a whim
+Session sharing for easy collaboration
+100% active development, long term support
-Possibility of data loss if server crashes
-Additional RAM must be used for the database (not to be used if you're running out of RAM as-is now!)
-Data must be viewed with the in-game browser
In having a unique database, WatchFox also has a similarly unique anti-overwrite system. Basically, when performing a rollback, a particular event will only be undone if the block hasn't been changed by a non-searched party. For example, your standard plugin will check to make sure that block is as it was after the event before rolling back (that is, if a block was broken, it will only rollback if the block is still Air). However, WatchFox has the unique ability to check for any post-event action. For example, if a malicious player spams dirt blocks around someone's house, and the victim later clears it all away, only to then put dirt back selectively, the dirt that the victim placed will not be rolledback. It is considered superseded. No longer will performing a rollback reverse the victim's own work!
If you want to try the most advanced and fastest logging plugin available for yourself, just click Downloads here or in the links bar, drop it into your plugins folder and /reload
. It has no dependencies, although it does support using WorldEdit.
Want to make WatchFox even more awesome? Report any bugs you find or request useful new features by clicking "Report a bug". Even simple things like errors in the documentation will be systematically fixed.
And don't forget to check out the other links available.
A note about downloads. As the main website for WatchFox is located elsewhere, download links on the wiki pages will direct you to my own website which hosts the jars as well. While I will maintain both the downloads here on BukkitDev and there, only the files here are subject to the quality control the BukkitDev staff impose. As such, you are encouraged to use the downloads provided here.
Are there any updates planned for this?
Im very confused with rollbacks. At one moment they work fine, another they don't. It skips very unusual things like rolling back a pathway of gravel, it will skip some gravel and rollback others. I have read your tutorial but it is very hard to follow. I am more of a video tutorial guy. Is there any good videos out there?
EDIT: Sorry if i came across a bit rude. I realized I might have. Anyways I have found my problem. It doesn't accurately get all events with world edit if you use the pos commands. It only works if you use the wand. Also is there anyway you can add a feature to ignore chests in a rollback? Or is that a feature already?
supertycoon0 I created an issue on your bitbucket page: https://bitbucket.org/super_tycoon/watchfox/issue/8/checking-if-equals-before-null-check
@Marcbmann
You don't have WorldEdit and WatchFox wants you to have WorldEdit :P
Watchfox is posting the following error to the console at startup. Any help would be appreciated:
@Mentioum
After much pondering and a touch of shower-mediation, I remembered bug BUKKIT-3979. The long and short of it is that you need to update to the latest alpha of CraftBukkit.
At this present moment, that happens to be http://dl.bukkit.org/downloads/craftbukkit/view/02065_1.5.1-R0.2/
No new version of WatchFox is required to regain operational status.
Thanks for reporting what you found! I never did test for doublechests...
@Mentioum
I can avoid the error by disabling item-transfer-logging in the config. I do want to log that though so please fix the bug ;) Much appreciated.
Submitted bug report but will post the title of it here too:
[SEVERE] Could not pass event InventoryMoveItemEvent to WatchFox v2.2.0
1.5.1. build
Miraculously, I even managed to support rollbacks with hopper carts and storage carts.
Oh and WorldEdit and Herochat support. If you ever want to see your CPU churn, WorldEdit a bajillion signs.
Firstly, an excellent plugin, that I use extensively with MyBlock. Secondly, is there any time frame for a stable 1.5 release of this plugin? It would be excellent to have, as it will allow me to update my server. Many thanks for your continued work, we all appreciate it over in my server.
@botskonet
Well that's just it, my purpose was to have a non-MySQL backed logging system that was as fast as any of the other plugins. So I wrote WatchFox. WatchFox doesn't use SQLite, or text files, or anything convenient. It's based on binary blobs, fixed column sizes, and hard coded indexes. The relatively tiny amount of storage space used should be evidence enough.
I really only wrote it for my own purposes, and in many ways we're targeting different things. Prism is pretty much a product in itself, while I like playing with things like MyBlock which can query thousands of times per second simply because I can.
@supertycoon0
I did miss your mention of sqlite. We very specifically say that our users should use sqlite as a last resort and many do. Sqlite is so incredibly limited that it's essentially swimming upstream for a plugin handling hundreds of thousands of records a day or more.
I'd drop support for it immediately if there was some better storage alternative for smaller servers.
@supertycoon0
Your information doesn't make any sense. What is it that you're testing? If you're testing data recording speed then you need to explain your measurements because other developers have reached very different results.
Please be more transparent with your data if you're going make claims that serve your own interests.
@supertycoon0 Interesting stuff. I've always been impressed by the performance of your database.
@Machinimatt
Unfortunately, it's getting really complicated to configure plugins to log the same data, but I performed a similar test and got the following results:
(Latest versions available, using sqlite with CoreProtect and Prism)
WatchFox: 300ms CoreProtect: 600ms SWatchdog: 16,200ms Prism: 16,400ms
WatchFox: 2.93MB CoreProtect: 24.6MB SWatchdog: 10.0MB Prism: 43.6MB
WatchFox and CoreProtect were also logging the most data and are the most directly comparable. SWatchdog only logged the exploding blocks, and Prism didn't log water flowing. I'll get around to performing another test, but these results will remain informal because of this.
So while I could have made Prism more comparable, you can see it's clearly lagging far behind WatchFox and CoreProtect in the performance department.
It's worth noting that CoreProtect v2 streamlined a ton of its internals and is very similar to WatchFox at a high level now. The listener times attest to that. (The database however is still very different, hence it being 8 times the size and slower)
My opinion (so yes, biased) is that WatchFox still remains the fastest and lightest plugin. It uses a custom database that was designed with Minecraft logging in mind and it shows in raw performance.
I would consider CoreProtect to be the only other considerable alternative for a no-mysql logging solution.
Funny enough, Prism is just like how CoreProtect (v1) used to be engineered (to an extent). So it will have the same problems until it also has it's v2.
The only downside to WatchFox is that it doesn't log WorldEdit... but I'm in the process of remedying that.
The upside to WatchFox is that it's so fast that plugins like MyBlock can exist.
Edit: I should note WatchFox is currently the only plugin flexible enough to allow a plugin like MyBlock to be as flexible as it is, however Prism is in the process of accomplishing the same goal.
Can you do a test between this and prism as I can only see the results compared to coreprotect and swatchdog.
@fox243
There were a very small handful of memory issues in the earliest builds of Java 7, but it's stable and it's the 'mainstream' build now. There are a large number of advantages for Java 7, and for a database system like the one used in WatchFox, there is actually a system to help prevent leaking from large amount of file reading/writing.
@KCZerG
1.4.5 r1.0 is the minimum version required. At the moment, the only thing lost (from not using 1.4.7 stuff) is skull data, which was added after I did my second 1.4 logger overhaul. As glaring of a defect as this is, the imminent release of 1.5 has led me to work on performance improvements first.
This looks like a great plugin i did a whole bunch of reading got excited then noticed the download is for 1.4.5 and you uploaded it 16 hours ago.... ?
1.4.7 ?!?!?!?
should compile it for java 6 and 7. java 7 is still 2 buggy has memory leaks in it. :/ over all looks like a good plugin
So I think all my docs are updated finally.
The big note with V2 is the breaking of database compatibility. I know that's a pretty big annoyance, however it should be stable unless the modding API throws a curveball I simply didn't anticipate.
But some good news is that I'm releasing an API that gives plugin authors a very fine-grained control of custom logging and rollback support. It also includes the ability for plugins to perform very advanced searches, just like in-game.
There's a new link in the links bar; API Info, which has some helpful pages and a tutorial with three demo plugins.