Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5048

MVVM DebuggerFactory should log via SLF4J

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Critical Critical
    • 10.0.0
    • 9.6.0.1
    • Databind 2
    • Security Level: Jimmy
    • None

      Use Case

      When a runtime error happens in data binding, it's hard to know which page, which component, which expression that causes it.

      org.zkoss.zel.PropertyNotFoundException: Target Unreachable, '4' returned null
      at org.zkoss.zel.impl.parser.AstValue.getTarget(AstValue.java:133) ~[zel-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:216) ~[zel-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:260) ~[zel-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.zkmax.bind.impl.ValueExpressionImplEx.setValue(ValueExpressionImplEx.java:64) ~[zkmax-8.5.1.3.jar:?]
      at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:51) ~[zcommon-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.zkmax.bind.impl.BindEvaluatorXImplEx$LazyBindXelExpression.setValue(BindEvaluatorXImplEx.java:138) ~[zkmax-8.5.1.3.jar:?]
      at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:61) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.SavePropertyBindingImpl.save(SavePropertyBindingImpl.java:168) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.PropertyBindingHandler.doSaveBinding(PropertyBindingHandler.java:115) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:172) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1899) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.BinderImpl.access$1100(BinderImpl.java:132) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1590) ~[zkbind-8.5.1.3.jar:8.5.1.3]
      at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1558) ~[zkbind-8.5.1.3.jar:8.5.1.3]

      User Story

      As an app developer:

      • I want to configure MVVM debug logging consistently so that logs are written in the desired files.
      • I can enable logging on a specific package, so it won't print too many messages.
      • I can know which component, the data binding expression, which page when this kind of error happens

      Acceptance Criteria

      logs are written into the configured files.

      Details

      currently the MVVM debug logs are written to console:
      https://github.com/zkoss/zk/blob/27f90007e4d63638036b059da0ce2cd608b9b597/zkbind/src/org/zkoss/bind/sys/debugger/impl/DefaultExecutionInfoCollector.java#L128

            rebeccalai rebeccalai
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: