maxant / rules

Ant's simple rule engine for Java, Java 8, Scala and Node.js.
Apache License 2.0
112 stars 42 forks source link

Help improve logging performance. Debug logging #7

Open gatling822 opened 6 years ago

gatling822 commented 6 years ago

`if (log.isLoggable(Level.INFO)) {

  log.info("matched: " + msg);

}

if (log.isLoggable(Level.INFO)) {

  log.info("unmatched: " + msg);

}`

The above log statements could be changed to DEBUG. In my system where there are 100+ rules run against 10,000+ transactions per minute. This log statement quickly takes over all the logs. If you change this log to DEBUG we would be able to keep helpful information like what rules are loaded but the information for which rules are matched is more of a DEBUG information for when we encountered an issue

maxant commented 6 years ago

In the mean time, you can set the log level of the rules engine to be a different level than that of the rest of the application. Or set default to be WARN and set your packages to be INFO.

maxant commented 6 years ago

btw, we happily accept pull requests