Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-382

ThrowableProxy passed into EventEvaluator

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.17
    • Fix Version/s: 0.9.18
    • Component/s: logback-classic
    • Labels:
      None

      Description

      In an event evaluator which is called in the option part of an "ex" formatting specifier I cannot use a "throwable instanceof example" expression, because the evaluator receives a ThrowableProxy and not a Throwable.

      Here is a stack trace, dumped from the evaluator expression. It does include a ThrowableProxyConverter.convert call:

      java.lang.Exception: Stack trace
      at java.lang.Thread.dumpStack(Thread.java:1206)
      at mireka.E.f(E.java:21)
      at SC.eval0(SC.java:3)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.janino.ScriptEvaluator.evaluate(ScriptEvaluator.java)
      at org.codehaus.janino.ScriptEvaluator.evaluate(ScriptEvaluator.java)
      at ch.qos.logback.core.boolex.JaninoEventEvaluatorBase.evaluat (JaninoEventEvaluatorBase.java:53)
      at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:109)
      at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:31)
      at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:32)
      at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:110)
      at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:132)
      at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:51)
      at ch.qos.logback.core.WriterAppender.subAppend(WriterAppender.java:267)
      at ch.qos.logback.core.WriterAppender.append(WriterAppender.java:117)
      at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:89)
      at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:60)
      at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:271)
      at ch.qos.logback.classic.Logger.callAppenders(Logger.java:258)
      at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
      at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:394)
      at ch.qos.logback.classic.Logger.debug(Logger.java:517)
      at org.subethamail.smtp.server.Session.run(Session.java:119)

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              hontvari3@solware.com Hontvári József
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: