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

org.zkoss.zel.Util outputs exceptions to the console directly - change to logger

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 8.6.0
    • 8.5.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.0 S1, ZK 8.6.0 S2

      In current ZK org.zkoss.zel.Util, some exceptions are ignored and a stacktrace is output in the console directly.

      Since these exceptions are used for debugging, they may cause confusion when parsing the server logs for errors.
      example here:
      https://github.com/zkoss/zk/blob/master/zel/src/org/zkoss/zel/Util.java#L542

      Using the internal ZK logger instead of direct output to console would allow developers to change the log level for this class / package depending whether or not they want to see the trace in server logs.

      For full ZK update: replace all direct .printStacktrace() in zk code by a logger call.
      INFO seem to be a good log level for these calls (will allow for deactivation without removing warnings and errors)
      https://www.zkoss.org/wiki/ZK_Developer's_Reference/Supporting_Utilities/Logger

      Note: should be still visible by default if the developer doesn't manually suppress the logs.

            CharlesQiu CharlesQiu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                1h