UltraLogger
Latest build : 2.1 Craftbukkit : 1.5.2
More than 10k downloads !! Thank you !!!
Beta UltraLogger v2.2 available here, you must delete your old configuration file
What is it ?
This is a logger plugin, a logger plugin logs informations to anything related to your servers so you know what was done on your server when ever you want.
Better than Big Brother !
The utlimate logger, nothing can be done without be logged !
A video tutorial on this plugin by never2nv on UltraLogger v1.0 :
The logs are flat files or can be logged into a MySQL database, the flat files are saved in a directory called Log that is in your server directory, you can read them with your prefered text editor, for more information about MySQL logging see this page
Features
- And soon much more !
- Rollback block commands
- Auto save
- In game history of blocks by right clicking an item, the player must be an OP or must have the permission ul.history
- MySQL support for all loggers see the page : here
- You can force saving flat files by reloading your server
- When something is logged the date and the time is specified
- If a player is an op or has the permission ul.admin the [Admin] prefix will be shown in the log
- The gamemode will be displayed like : (CREATIVE) or (SURVIVAL) and the world beetween brackets.
- Update Checker checks if you have the lastest build of this plugin
- Anti command logger ( commands you do NOT want to be logged ) File : silent_commands.txt
- Log Customization, you can configure what your loggers log and create new ones. see this page for futher information
- You can enable or disable MySQL loggers in the config.yml file
Commands
command | information |
---|---|
//ulundo <x> <y> <z> [x] [y] [z] | undo the latest block placement/destruction at the specified x,y,z but if two locations are written that will do the same thing for all blocks beetween these locations ( like in WorldEdit the two locations taht you choose with the wooden axe)(your action can be cancelled by typing the redo command but after disconnection you couldn't cancel) |
//ulredo <x> <y> <z> [x] [y] [z] | the same command as undo but redo what you've canceled with the undo |
Permissions
permission | information |
---|---|
ul.* | allow the player to use all the features of UL ( grants all permissions of UL except the perms to avoid to be logged ) |
ul.history | allow the player to see the history of a location |
ul.admin | players with this permission will be shown with the admin prefix in the logs |
ul.rollback | allow players to use rollback commands |
ul.avoid.X | allow players to avoid to be logged on the event with id=X or on all the events that contains the group X. For further information see here |
Config file
YOU MUST DELETE YOUR OLD CONFIG FILE
The config can only be edited when your server is stopped
#General properties #Check or not if you are using latest build available check_updates=true #Enable or disable ingame use of an item to see what happened at the specified location history_logger=true #The id of the item with you can see the log of a location item_revealer=280 #File logger properties ---------------------------------------------------------------------------------------------------- #Time in seconds beetween each auto-saves of the logs auto_save=3600 #Overwrite or not the last logs overwrite=false #Maximum number of lines of a log file ( 0 for no limit ), it will erase the first 10% lines of the log max_lines=0 #Do NOT modify this value please, it is used to know last time UL created the log folder last_created=1366823381660 #The number of day until UL creates a new log folder folder_duration=7 #For more information on configuration see http://dev.bukkit.org/server-mods/ultralogger/pages/logger-configuration/ log_block=1@11 log_chat=69 log_command=70 log_craft=12@15 log_entity=&entity log_inventory=&inventory log_player=&player log_vehicle=59@62 log_weather=63@65 log_world=66@68 #Event groups ---------------------------------------------------------------------------------------------------------------- group_entity=16@32 group_inventory=33@35 group_player=36@58+71+72 #SQL logger properties ------------------------------------------------------------------------------------------------------- #While host value is equal to "blank" or "null", SQL will be disabled host=blank port=3306 name=root pass=1234 database=blank table_prefix=UL #SQL Loggers couldn't be fully configured so only enable/disable sql_block=true sql_chat=true sql_command=true sql_craft=true sql_enchantment=true sql_entity=true sql_inventory=true sql_player=true sql_plugin=true sql_vehicle=true sql_weather=true sql_world=true
Coming soon
- One log for each player feature ( beta 2.2 )
- LogViewer
- Please post suggestions
Support us !
You can easily support us by using one of the icons below :
Made by supercrew632 :
The BBCode to add is :
The HTML code to add is :
<a href="http://dev.bukitt.org/bukkit-plugins/ultralogger"><img src="http://dev.bukkit.org/media/images/58/242/icon_UL.jpg"></img></a>
Repo
Credits
To @_Justyce_ and @roelmb
I was wondering if you might be willing to help me fix an incompatibility between my plugin and yours. The plugin is skylab and the explosion events it creates are not passing into utralogger. This is causing massive console spam and abnormally high memory use. I would appreciate any help you can give me on resolving this issue.
@allpeg
Yep I find it very weird that bukkit even allowed this plugin with no prepared statements..
To fix the MySQL-injection problem take a look at http://dev.bukkit.org/server-mods/deityapi/
Wow, finally mysql version!
escaping
However, there is a big problem with escaping: Let's say a message with \ (aka backslash)
16:50:02 [INFO] [UltraLogger] (ERROR) Can NOT execute query : INSERT INTO `UL(v1.6)_chat`(`time`,`op`,`playername`,`text`) VALUES (NOW(),true,'alpeg', '\');
16:50:02 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\')' at line 1
what? that's not a good idea to escape string with just replacing quotes. In php, there is 2 ways to escape strings in mysql queries: mysql_real_escape_string and prepared statements. mysql_real_escape_string is used to escape strings in plaintext sql queries, like:
$q=mysql_query("SELECT * FROM `table` WHERE `title`='".mysql_real_escape_string($_GET['title'])."' LIMIT 1;");
that query is injection-safe, but now this way considered "dirty" and non-safe: what if you forget to escape string? or treat integer as string?
Second, and "right" way is prepared statements.
I searched and found that there is absolutely no way to escape string without using prepared statements in java using built-in functions. But if you don't want to re-write all of your sql code, i found a workaround: mysql_real_escape_string for java!
table and field naming
table structure is fine, but that's a bad idea to use non-alphanumeric characters (except underline) in mysql entity names. Specifically, don't use slashes in column names (InvTitel/Item), and don't use dots and parentheses for table names and prefixes. Even if you can, that can cause problems in some cases.
charset issues
If you will say something non-ansi ( for example, in russian characters, or any other 8-bit extended ascii character ), that will be saved in database as "?". I don't know why - probably it's a minecraft or bukkit issue.
other issues
Default values in config files should be changed:
Max-Lines=1000
NewFileEvery=NEVER
Isn't that means that by default config file will be erased every 1000 lines? Default values should be: unlimited lines and new file every day or week, because everyone expect LOGGING from logging plugin, not the ̶h̶i̶t̶ ̶a̶n̶d̶ ̶r̶u̶n̶ log-and-throw!
One more issue, you can't change logging options on-the-fly - you have to stop server for that, because last line (LastDELtime) updates very often, and all changes to this file will be lost if the server is running.
p.s. you ( @roelmb @_Justyce_ ) have every right to hate me (: Thanks for great logging plugin!
@Stuntweed First reported problem with dots! I don't know why, but dots in table names works fine for me. Try changing the
SQL-table-prefix=UL(v1.6)
to
SQL-table-prefix=ul_1_6_
@roelmb
Error when setting up tables:
pastebin.com/dFdc8SvS
@allpeg
Yes we are but we aren't sure yet on how to do it and we are thinking of totally remaking it but that is in early stages and need some serious studies on the most efficient database methods with table linking etc...
For the moment we are testing the loggers that where already in and just got modified for sql.
Are you planning to use version control system?
@swimmer1929
Sorry, there's no way to get it back but you should save your important logs or increase the num of max lines
Ugh, I had the max lines option in the config file set to 1000, and something important that I needed was erased. Is there ANY way to get it back?
@roelmb
Hehe sorry, I was just excited :PPppPppP
Yay for multithreading!
@Stuntweed
For the 2nd and last time :D I'm totally recoding sql loggers and database connections Also adding multi threading.
@allpeg
Yeah you are right, this code shouldn't even be approved by bukkit... A player could delete a whole database with this..
We are currently working on SQL the versions you can find here aren't changed yet
@Stuntweed Thanks for compiling, but that's still not a sql logger i want.
I hope you also changed blocklogger and chatlogger tables and quesies structure? Oh shi, you're not. /facepalm
and read the whole message
Things like this should also be changed to make better database
Anyways,
isn't that sql injection?
for now, the only safe decision for admins is use file-based logging and wait for new version. Logging to database is good, but it's not critical (at least for me atm).
Database logging advantages
With database we can, for example, make a queries to disaplay per-user command usage statistic or search for dangeorus commands like /op or watch what someone is trying to do after getting fake-opped with sql queries
Made a new version of UltraLogger based of http://dev.bukkit.org/server-mods/ultralogger/forum/42972-mys-ql-logging-epic-fail/#p1
It uses timestamp and autoincreased ID row to make it easier for listing on websites etc
DL: removed
Git: https://github.com/Fronix/UltraLogger
And btw this plugin should DEFINITELY be remade to support multi-threading..
@Stuntweed
Fixed ;) in build 1.5.2
@_Justyce_
Okay ill just wait until it is fixed, I need the MySQL logging =P
@Stuntweed
Yes i've some problem with mysql logging , currently disable it for no problems else i'm resolving them. Normally if your database exists your database will be created and if not it will be created, the tables are automaticaly created if they're not existing
Really nice plugin but MySQL logging for chat, command and blocks is not working for me. Do i create my own tables or does the plugin add them automatically?
Error: http://pastebin.com/Dnfb97P2
@Broadsky
This plugin is compatible with backpack as you can see in the log below :)
@roelmb
It would be great ;)