ConsoleFilter
Keep your server console and log file clean.
Updated version of my outdated Plugin BlockConsoleMessages.
Important
Updated to work with CB-1.4.7-R1.0. Might work with lower/higher versions as well but I haven´t tested that. This is just a quick rework to work with the newest version of CB and it was working in my testing envrionment. However: Before using it in a productive environment please test this plugin!
Known issues
Sadly there are some drawbacks. Nowadays each plugin gets it´s dedicated logger developers should use. My plugin sets filters for all plugins that are or get registered in CB.
Now to the problem: Developers are not forced to use the plugins default logger. They can just send their messages to custom created loggers. ConsoleFilter doesn´t know about these loggers and therefore wont filter them. Theoretically I can get all active loggers and put filters onto them. However this would mean that ALL loggers get filtered, be it from bukkit, a plugin, java, etc. As this is not the way it should be done I wont do it this way. This means that some console output will not be intercepted by ConsoleFilter and therefore wont get filtered.
Installation
- Copy the JAR file into your plugins-folder.
- Please remove BlockCantKeepUpSpam.jar and BlockConsoleMessages.jar if you're using any of them.
- Start the server. If no config file exists the plugin will create one under "./plugins/ConsoleFilter/".When creating a new config it will add the filter for the "Cant keep up!"-message.
- Stop the server and edit the configuration.
How to use
- Open the configuration file while your server is offline.
- Under "Filters:" add a new line and write the following:
- - FilterName: <FilterName> Replace <FilterName> with any name you want to give the filter.The whitespace between the minus and FilterName is important.
- Add your filter parameters. Each value needs to be preceeded by TWO whitespaces.Possible values:
- FilterType: Exact|Partial|Regex|Level
- Exact: Filters for the exact string given by ConsoleMessage. Requires option: ConsoleMessage.
- Partial: Searches for the partial string given by ConsoleMessage. Requires option: ConsoleMessage.
- Regex: Applies the regular expression defined in ConsoleMessage. Requires option: ConsoleMessage.If you mess up with these you can easily block all console output. ;-) (It wont harm your server though.)If you're interested in learning RegEx: http://en.wikipedia.org/wiki/Regular_expression
- Level: Filters on logging level basis. (e.g. Info, Warning, Severe, etc.) Requires option: ConsoleLevel.
- ConsoleLevel: [Info|Warning|Severe] Optional. This rule applies only to messages with the appropriate logging level.
- ConsoleMessage: <Message|Regex> Optional. String or regular expression to match. Replace <Message> with the string/regex of your choice.
- LogToFile: [true|false] Optional. When set to true it will log the intercepted message to a seperate log file.
- LogfileSuffix: <SuffixString> Optional. This way you can specify seperate logfiles for different rules. Replace <Suffix>with the suffix you want to give the log file.
- Save your configuration file.
- Start your server and (hopefully) enjoy your cleaned up console & log.
Example for a configuration file
ConfigVersion: 0.5 Filters: - FilterName: Filter CantKeepUp Messages FilterType: Exact ConsoleLevel: Info ConsoleMessage: Can't keep up! Did the system time change, or is the server overloaded? - FilterName: Filter all Warnings FilterType: Level ConsoleLevel: Warning LogToFile: true LogfileSuffix: Warnings - FilterName: Filter lost connections FilterType: RegEx ConsoleMessage: '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]{4,5} lost connection' LogToFile: true LogfileSuffix: LostConnections
PERFECT PLUGIN THANKS YOU WORK ON 1.7.9-1.8 BUT NOT WORK THE CONSOLE MESSAGE BUT I NEED THAT THE CONSOLE SILENT BECAUSE THE COMMANDBLOCKS BUT THIS PLEASE FIX FOR ALL PEOPLE THAT THIS NEED ON
how do you filter these messages? everything I''ve tryed didn''t work [SEVERE] Reached end of stream for <IP>
@deleted_5267469
Can anyone test this on 1.6.2?
Does anyone have this working on 1.6.2? I can't get it working and it's not throwing any errors.
Works on 1.5.2!
@MineCooky
+1 ! please update it to 1.5.2!
Can you make a new version of the plugin for Minecraft 1.5.2 ?
Hi nice plugin, but can you please show me how I have to set up a Filter for those messages:
18:54:55 [INFORMATION] /212.83.45.130:50811 lost connection
Because this wont work:
- FilterName: Filter lost connections FilterType: RegEx ConsoleMessage: '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]{4,5} lost connection' LogToFile: true LogfileSuffix: LostConnections
I tried a lot of things, but didn't get it
Thanks for help
http://dev.bukkit.org/server-mods/consolefilter/files/1-console-filter-0-5/ here you go just checking for forceops right now but should be OK
Looks great! When will the download be up?