Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215722

Java Access Bridge logging and debug flags dynamically controlled

    XMLWordPrintable

Details

    • minimal
    • Hide
      There is no compatibility risk, since this is a pure debug feature, and is only intended for debugging purposes.
       
      Show
      There is no compatibility risk, since this is a pure debug feature, and is only intended for debugging purposes.  
    • Use or define an environment variable

    Description

      Summary

      This request is to write the accessibility related communication exchange between JAWs and Java Application to a log file for debugging problems.

      Problem

      Java Access Bridge (JAB) which is a windows-only JDK native API to support accessibility, does not provide any way to enable logging of itself or an Assistive Technology using JAB. This means that debugging of problems in a user setting is impossible and it is thus hard to identify and fix problems. Since JAB communicates with an AT, both sides need to support logging to make this useful.

      Solution

      Define an environment variable "JAVA_ACCESSBRIDGE_LOGFILE" which when specified, and pointing to a writable file location, will enable logging of Java Access Bridge activity to files specified by that variable. Two log files will be created, using the variable name as a path and prefix: one written by the JavaAccessBridge itself (loaded by Java), one written by AT which loads a Java provided DLL, windowsaccessbridge.dll

      If the variable is undefined or empty, or points to a non-writable location, no logging will be performed. This will be provided to customers on request.

      The logging is explicitly limited to be enabled for one application at a time, i.e. it cannot support concurrent applications, which is sufficient for its purpose as a debugging tool.

      Specification

      Define an environment variable "JAVA_ACCESSBRIDGE_LOGFILE" which when specified, and pointing to a writable file location, will enable logging of Java Access Bridge activity to two files as follows:

      JAVA_ACCESSBRIDGE_LOGFILE represents the path name + file name prefix to be used for two files, created using this prefix, i.e. : 1) ${JAVA_ACCESSBRIDGE_LOGFILE}_java_access_bridge.{ext} 2) ${JAVA_ACCESSBRIDGE_LOGFILE}_windows_access_bridge.{ext} Note that {ext} can be specified in the environment variable itself. If there is no extension specified, then by default ".log" extension will be used. (1) logs information from the Java process which loads javaaccessbridge.dll (2) logs information from the AT process which loads windowsaccessbridge.dll

      The logging should be limited to be enabled for one application at a time, i.e., it cannot support concurrent applications, which is sufficient for its purpose as a debugging tool.

      The logged results are intended to be interpreted by support, not the customer.

      The logging format is as follows: [Log_Level]: \n, where, Timestamp is time in nanoseconds, Log_Level can be any of INFO, ERROR, WARN, message is the log text.

      Attachments

        Issue Links

          Activity

            People

              kaddepalli Krishna Addepalli
              shadowbug Shadow Bug
              Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: