It's all about the answers!

Ask a question

script logging not showing in eclipse workspace


Susan Hanson (1.6k2201194) | asked Jul 25 '13, 11:21 p.m.
I'm debugging a JavaScript-based validator and I am not getting the debug messages that I have put in.

    validate: function(attributeId, workItem, configuration) {
        //debug only right now
        console.log('validator');
        console.log(workItem.getValue(WorkItemAttributes.OWNER));
        console.log(workItem.getValue(WorkItemAttributes.FILED_AGAINST));
        var severity = "ERROR";
        var message = "A work item owned by an individual must be Filed Against a team backlog. Set the Filed Against attribute to your teams' backlog ";
        return new Status(Severity[severity], message);
        //end debugging

I am just printing a few things in the console (I need to get the UUIDs of things that I don't know how to get to any other way than printing it).

I have verified that the validator is running because I am getting the error, and if can change the message, reload, and get the changed message, so I know it is running the right version of my script.

My workspace is c:\RTC4001\workspace
and I look in c:\RTC4001\workspace\.metadata\.log and I have no log messages appearing.

I know I've done this before and I have no idea why I can't find these.  Can someone tell me where I went wrong?
Susan

Accepted answer


permanent link
Dinesh Kumar B (4.1k413) | answered Jul 26 '13, 2:57 a.m.
JAZZ DEVELOPER
adding to what Ralph has already answered :

here is the location on the server where you will see the log in case the script was run on the server:
JazzTeamServer/server/tomcat/work/Catalina/localhost/ccm/eclipse/workspace/.metadata/.log

for a websphere installation, you might want to check corresponding profile directory.

the attribute customization wiki article documents this, with a sample of logged message:
https://jazz.net/wiki/bin/view/Main/AttributeCustomization

Using Firefox, you should be able to see the console.log messages on the console tab of Firebug.  If it appears here, the client is executing on the client side and the local workspace .log will have it tapped.  Some scripts executed as part of the save operation on the workitem would execute on the server and is captured in the server logs.

hope it helps.
Susan Hanson selected this answer as the correct answer

One other answer



permanent link
Ralph Schoon (63.5k33646) | answered Jul 26 '13, 2:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Some scripts run in the client, some in the server. Look into the workspace of the server Eclipse. See the Process Enactment Workshop Lab 5 for hints where to find it.

Comments
Susan Hanson commented Jul 26 '13, 4:17 a.m.

Ah, I guess the last script i was doing (calculated field) ran on the client as I saw it in my eclipse client vs this one is a validator, which I guess runs on the server.

For the scripts that log on the server, how do you look at the logs if you don't actually have access to the server?  I can see the messages on my test server but not my production server.


Ralph Schoon commented Jul 26 '13, 5:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you are an admin you can download the logs in the diagnostics section.
You should develop on a test system anyway and only deploy the scripts on the production server, once they are working. You should switch off excessive logging on the production server I would probably wrap my code in a catch throw to only log fatal errors.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.