Uploaded image for project: 'Identity Gateway'
  1. Identity Gateway
  2. OPENIG-1932

ScriptableFilter and ScriptableHandler configuration reference is missing references to logger parameter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0, 5.5.0
    • Fix Version/s: 5.5.0
    • Component/s: Doc
    • Labels:
      None
    • Sprint:
      OpenIG Sprint 112, OpenIG Sprint 113

      Description

      I am not sure why logger was removed as an item that is available to scriptable components from the configuration reference for ScriptableFilter and ScriptableHandler, a logging component is still made available to scripts, it is just a different type now that we have switched logging frameworks.

      Since OPENIG-1201 we add a unique "logger" instance depending on the name of the script:

          private Map<String, Object> enrichBindings(final Bindings source, final Context context) throws ScriptException {
      .....
              bindings.put("logger", getScriptLogger());
      .....       
      
          private Logger getScriptLogger() {
              return LoggerFactory.getLogger(format("%s.%s", this.getClass().getName(), name));
          }

        Attachments

          Activity

            People

            Assignee:
            joanne.henry Joanne Henry
            Reporter:
            markdr Mark de Reeper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: