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

LabelLoaderImpl: fine tune logging

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Done
    • Normal
    • 8.6.0
    • 8.5.2, 8.6.0
    • Components
    • Security Level: Jimmy
    • None

    Description

      The warning log about missing labels ( ZK-2075) in https://github.com/zkoss/zk/blob/v8.5.2.1/zcommon/src/org/zkoss/util/resource/impl/LabelLoaderImpl.java#L95 can be quite verbose at times and even have a considerable performance impact.

      In some use cases it might be intended to allow missing labels, and implement the missing label fallback inside the application code (e.g. if labels are not only locale dependent).

      As the intention of this log is for debugging purposes the log level can be changed to DEBUG, to avoid affecting production system logs, which often run at INFO or WARN level.

      At the same time a protected method to handle the missing label can be added (e.g. "handleMissingLabel") method to allow easy overriding and configuration of a custom LabelLoaderImpl implementation (The default constructor can't be bypassed by subclasses)

      Attachments

        Activity

          People

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified