beanshell interface

A forum for Partner developers.

beanshell interface

Postby Donald@fbemc » Fri Feb 26, 2010 8:22 am

I have an interface with our work order system that is written in beanshell. Everything works fine except it doesn't put the log messages under the interface tab. They come up under the system log tab with everything else but they do not show up under the associated interface tab. I tried a short python script just for kicks and it logs under the interface tab as I would expect. Is there any way to get the beanshell script to do that or do I need to convert it to python?
Donald@fbemc
 
Posts: 25
Joined: Wed Nov 01, 2006 11:02 am

Re: beanshell interface

Postby paul » Fri Feb 26, 2010 12:43 pm

So this is a staking interface, yes? Jeremy has been grumbling about those tabs too... I'll have to do a little research to figure out how you get things into those tabs. I suspect the python works because it's old, special behavior from Days of Yore.
Paul Reavis
President
Partner Software, Inc.
User avatar
paul
 
Posts: 206
Joined: Thu Oct 19, 2006 2:27 pm
Location: Athens, GA

Re: beanshell interface

Postby paul » Fri Feb 26, 2010 12:48 pm

Indeed, special Python behavior. Here's a workaround:

Code: Select all
import com.partnersoft.core.LogFactory;

// this is the name of your module as listed in Interfaces.tof
name = "Foo";

// this replaces the default script log variable with the one watched by the tab in the Hub
log = LogFactory.logFor("com.partnersoft.v3x.apps.Staker.interfaces.ExternalInterfaceModule:" + name);
Paul Reavis
President
Partner Software, Inc.
User avatar
paul
 
Posts: 206
Joined: Thu Oct 19, 2006 2:27 pm
Location: Athens, GA


Return to Developer Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron