JDK-8221680 : Change the environment variable for Java Access Bridge logging to have a directory
  • Type: CSR
  • Component: client-libs
  • Sub-Component: javax.accessibility
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 13
  • Submitted: 2019-03-29
  • Updated: 2019-04-25
  • Resolved: 2019-04-25
Related Reports
CSR :  
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_LOGDIR" which when specified, and pointing to a writable file location, will enable logging of Java Access Bridge activity. Two log files will be created, namely "java_access_bridge.log" and "windows_access_bridge.log": 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_LOGDIR" which when specified, and pointing to a writable file location, will enable logging of Java Access Bridge activity to two files namely "java_access_bridge.log" and "windows_access_bridge.log"
"java_access_bridge.log" logs information from the Java process which loads javaaccessbridge.dll 
"windows_access_bridge.log" 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.
Comments
> Where is this environment variable planned to be documented? As noted in the solution statement "This will be provided to customers on request" So not documented, since ... > I take it the format of the log files is not an exported interface to users. ... also as noted, support will interpret the results. Not the customer.
25-04-2019

Where is this environment variable planned to be documented? I take it the format of the log files is not an exported interface to users. Moving to Approved.
25-04-2019

Yes, this reflects what we decided on as a simplification of what was previously proposed. And yes windowsaccessbridge.dll is a JDK component, installed by the JDK & JRE installers for Windows. -phil
24-04-2019

windowsaccessbridge.dll will be copied into C:\Windows\System32 by the java installer, so there is no specific user action required here.
09-04-2019

The scope field is not set and there are no reviewers. Marking the request as pended. Where is a user supposed to get does windowsaccessbridge.dll from?
09-04-2019