Issue Type: Bug Bug
Affects Versions: 1.1.3
Assignee: Logback dev list
Components: logback-classic
Created: 15/Jun/15 12:40 PM
Description:

Multi-line strings are converted using single quotes instead of triple-double-quotes.

If you click on "View as .groovy" in the GEventEvaluator filter example then the resulting code is broken.

evaluator(GEventEvaluator) {
      _expression_ = 'e.level.toInt() >= WARN.toInt() && 
           !(e.mdc?.get("req.userAgent") =~ /Googlebot|msnbot|Yahoo/ )'
    }

Single- or double-quote strings in Groovy must not span multiple lines.

I'd suggest to use something like this instead:

evaluator(GEventEvaluator) {
      _expression_ = """
      e.level.toInt() >= WARN.toInt() && 
           !(e.mdc?.get("req.userAgent") =~ /Googlebot|msnbot|Yahoo/ )
      """
    }
Project: logback
Priority: Minor Minor
Reporter: Joern Huxhorn
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to