United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7153446 : Redirect browser VM debug log to browser console

Details
Type:
Enhancement
Submit Date:
2012-03-13
Status:
Resolved
Updated Date:
2012-03-21
Project Name:
JDK
Resolved Date:
2012-03-21
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
Currently debug info from browser JVM goes to shell console window. This is not ver convinient to lookup/use.

We could redirect it to the browser console using window.console.log API if available.

                                    

Comments
EVALUATION

goals:
    - Be able to see browser JVM plugin trace in the browser console
    - Basic tracing framework to use browser logging capabilities

Approach:
    - Browser JVM can have list of PluginLog instances
    - One of them does what we used to have - output to console
       (PluginLog itself for Mac/Unix, ConsoleLog on windows)
    - We also create FirebugLog object per plugin instance.
      It will send output to window.console.log provided by Firebug
       and most of the modern NPAPI based browsers.
    - PluginTrace.java is java view on the log framework.
      Currently we only use it to redirect stdout to it
        (most of trace log on browser VM side is stdout based).

Change keeps original console shell window. In my experiments i tested log to the browser console works for:
    - Safari on Mac
    - FF 3.6 + Firebug on Windows
    - Chrome 17 on Windows
                                     
2012-03-15



Hardware and Software, Engineered to Work Together