Configuration

Configuration example

filters:
 - type: ExactFilter
   expression: Can't keep up! Did the system time change, or is the server overloaded?
   case-sensitive: true
   
   #remove my own logs...
 - type: LoggerFilter
   expression: 'alexoft.tlmd.main'
   case-sensitive: false
   
 - type: RegexFilter
   expression: '(.{1,16})\[/([^\]]+?)\] logged in with entity id ([0-9]+?) at \(\[(.+?)\] (.+?)\)'
   log-to-file: logins.log
   
 - type: LevelFilter
   expression: 'INFO'
   log-to-file: level_info.log
 
 - type: AlterateFilter
   expression: 'Done \(([0-9,]*?)s\)! For help, type "help" or "\?"'
   replace: 'Server is ready ! It took $1 seconds :)'

Filters type

All filters accept a log-to-file option, to save the filtered logs.

ExactFilter

mask when the log is identical to expression

options :

  • case-sensitive

RegexFilter

mask when the log match the regex expression

LoggerFilter

mask when the log came from a specified Logger. The logger name is the main class of the plugin, you can find it by opening the plugin's jar like a zip file, and reading the line main in the file "plugin.yml"

options :

  • case-sensitive

LevelFilter

mask when the log is at a certain level

AlterateFilter

Replace a line with another in the log file. expression should be a regex

requiered option :

  • replace

PartialFilter

mask when the log contains expression

options :

  • case-sensitive

config.yml

force-filter:
  enable: false
  interval: 20
summary-on-start: true
use-color-codes: true
separate-logs:
  enable: false
  directory: 'logs'
  remove-colors-on-file: true
  remove-from-main-file: false
  • force-filter : optionnal, enable if you have problems with logs not being filtered after some time. Interval is in seconds
  • separate-logs : if enabled, save one log file per plugins, useful if you have a lots of plugins

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes