This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 239058

Summary: console log messages that use argument substitution do not return proper value in Output Browser log window
Product: javascript Reporter: peppertech <peppertech>
Component: DebuggerAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal CC: terje7601
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description peppertech 2013-12-02 23:58:13 UTC
Product Version = NetBeans IDE Dev (Build web-main-72-on-20131124)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01


If I use a console.log() call that uses argument substitution, it will show up fine in all of the browser dev tools, including CDT, but it will not resolve properly in the Browser log output window.

Use the JET logger API (which just wraps console API) Code such as:
var yLog = oj.Logger;
myLog.error("My log level is %d and the string is %s", myLog.option("level"), 'Something interesting');

Returns this in the IDE log window.
My log level is %d and the string is %s (12:38:24:344 | error)

In Chrome CDT it returns
My log level is 4 and the string is Something interesting
Comment 1 Vladimir Riha 2013-12-03 08:55:02 UTC
Reproducible for both parameters and multiple strings:

window.console.log("Error: %s (%i)", "Server is  not responding",500);
window.console.log("A", "B");


Product Version: NetBeans IDE Dev (Build 201312030002)