List Info

Thread: Re: output panel filters problem.




Re: output panel filters problem.
user name
2007-03-06 12:53:10
oh man yeah, I totaly whizzed on remembering ClassFinder!  Thanks for bringing that back up

One thought is: Does that always work? ; using arguments.caller?  Seems like my testing that was sooooo hit and miss half the, but then again, that was a long time ago.  What's your take on that?

As for using other loggers, I've thought the same thing lately - Xray's logger is "good", and the recursion is nice, but I don't focus on that. ; Xray is more about runtime control and inspection rather than traditional logging.  I was considering how I might just leave the logger with an open API for runtime control on package filtering and levels.

thoughts?

On 3/6/07, Hans Wichman < j.c.wichmanobjectpainters.com">j.c.wichmanobjectpainters.com&gt; wrote:
Hi,
John, why do you need mtasc or as3 to get the packages? Using the ClassFinder you are already using and the FunctionFinder, this info is readily available in as2 (and cached). Maybe not in 100% of the cases, but anyway, it might help^^.
I know the note on xflas2 still says the f...g thing is in beta^^ but it is actually pretty stable.
 
Check the last version of these files on http://www.objectpainters.com/xflas2/
&nbsp;
How it basically works is like this:
a function calls Logger.log ("foo");
 
The ClassFinder adds info to each class about its classname and package name, the FunctionFinder adds info to each function concerning its defining class.
&nbsp;
In your log call you look up the calling function, ie arguments.caller
then you need two lookups:
myClass = FunctionFinder.getFunctionClass (arguments.caller);
myClassPath = ClassFinder.getPath(myClass);
 
Note that if you have:
&nbsp;
class a.b.c.d.MyClass {
   function myMethod() {
   ; &nbsp; Logger.log("foo&quot;);
}
}
 
you could actually get Logger.log("foo&quot;) to say, okay this call came from "a.b.c.d.MyClass.myMethod&quot;, and then you can filter away.
This is exactly how it happens in xflas2.
 
I know we've been down this road before but feel free to copy anything usable. If you do want to take a look at the barebones of it, you'd need to check out the Logger / SendInfo / ClassFinder &; FunctionFinder classes. Packagefiltering, methodname filtering etc is all included as well though. And like I said, you dont need mtasc or as3 to do it.
&nbsp;
An other option would be ofcourse to not include anything like this, and simply let people download the loggers of their choice. Most of them support Xray and if they dont... WELL THEY SHOULD coz it roxxors
 
Up the irons!
JC

 
On 3/6/07, John Grden < neorileygmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> neorileygmail.com> wrote:
OH man, I was just going through my Xray email and I saw this!!&nbsp; So sorry I didn't reply sooner!

below...

On 2/26/07, analogdesign < newslanalogdesign.ch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> newslanalogdesign.ch > wrote:
>> You're the first person to bring it up ;)
Ok so I've right to go nuts ;)
 
1:
package filtering!! That's a must have feature ;) How do you intend to add this regarding to the GUI a radio button+ a textfield&nbsp;?
( ) DEBUG ; ( ) INFO  ( ) WARN  ( ) ERROR ; ( ) FATAL ; &nbsp;  ( ) PACKAGE [whichPackage to filter]
a radio button + a combobox automatically filled ?

Good questions   the answer is: I don't know yet.  I have 2 other guys bugging me for Package filtering (including myself) and I just have to sit down and think it out.  Part of the problem with it is, you have to use MTASC to compile or with the as3 version, you have to use the debug player to get packages.&nbsp; But that's all doable.&nbsp; Just need to sit and "do&quot; it.
 

2:
bug report:
when I put in the search text field a string with a . the string isn't searched:
 
myPackage ---> search occurs
myPackage. ---> search doesn't work
 
sometimes search doesn't work and select random string in the output panel. I've remarked the same behaviour in Flashout logger, so that's surely not caused by xray.

Yeah, I'm sure I can fix that up much cleaner.&nbsp; I really just took it from the old interface and ported the functionality to as3/flex2. 
 

3:
feature request:
 
A:
It could be very useful to have a search field which "keep an history of 10 previews searches " (a bit like firefox does)

So, would this just be a history of the last 10 search phrases?
&nbsp;

B:
next to [ ] case sensitive: what about adding toggle autoscroll? What about adding&nbsp;clear&nbsp;panel on new connection established?

It does auto scroll, maybe I'm missing what you're asking?

what's a clear panel? OH do you mean "clear trace output when new connection occurs&quot;? yeah, I've wanted that too, but I think adding an Xray call instead might make more sense.&nbsp; That way, the developer can control if Xray's output is cleared or not when the app starts, OR when an app hits a certain section
 

C:
I definitely prefer the way you choosed to output each trace occurence over flashout logger. I mean including the class path + function where it was called.
Also the "show output&quot; check box and the way it behave.
Flashout logger: when you pause trace output, it caches all the traces, when you reenable&nbsp;trace outputs you have a flood of cached traces that most of the time kill eclipse...
 
Don't you think that show output should be by default on when you restart xray?

It's a toss up - I could turn it back on.  Right now, it just remembers your last choice.&nbsp; I'm open to changing that though ;)
 

Don't you think that the check box is a bit confusing for this feature? What about for example a "play, stop button&quot; ?
 
D:
Do you plan to add a background color for each trace occurence? Whether a light odd/even visualisation or/and a background color by log category?

Yeah, i'd like to, but to do that (correct me if I'm wrong) I have to do html text for the formatting.  That slows down the output even faster/sooner than regular text. ; IE: when you get alot of traces happening, it takes up more CPU to render all of that then regular text. ; THe original interface used to do that btw
 

E:
what about adding differenciation between traces which are called on fly from the xray interface and those which are in classes?

Yeah that sounds good
 

I haven't much experience with other loggers, but I feel like I prefer to have all centered in one tool like xray.
Which logger do you use? And do you think that xray can support all the must have features of a perfect logger? (I trust you on that point ;) )

I use Xray's logger of course ;)  All the features?&nbsp; Not yet, but it will have 90% of what most developers look for. I think that other 10% would be items like accomodating another logger or trace utility, but as for functionality (barring, of course, breakpoints), it'll have the features.&nbsp; If anything, it'll have more "runtime" options that other loggers aren't able to do without a proper interface to control them at runtime.&nbsp; Make sense?
 

Waouw one more time a bit long ;)
Sorry for that.
 
Have a nice week end!
 
 

Best regards.

Cedric Madelaine (aka maddec)
analogdesign.ch

 


De : xray-bouncesosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> xray-bouncesosflash.org [mailto: xray-bouncesosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> xray-bouncesosflash.org] De la part de John Grden
Envoy�&nbsp;: vendredi, 23. f�vrier 2007 14:26

�&nbsp;: xrayosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> xrayosflash.org
Objet&nbsp;: Re: [xray] output panel filters problem.

 
you&#39;re right, there's an issue with that unfortunately.  I was waiting to put in package filtering before fixing that bug ;(

You9;re the first person to bring it up ;)

On 2/23/07, analogdesign < newslanalogdesign.ch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">newslanalogdesign.ch > wrote:
Hello John,
 
 
I'd like to use the Xray output instead of the flashout logger panel.
 
Traces are correctly catched by xray output panel. But the filter thing with DEBUG, INFO, WARN, ERROR, FATAL, doesn't filter anything...
 
XRAY
interface version: Windows SWHX Projector v 2.0
connector version: 1.6.2
 
 
Based on you sample Code
import com.blitzagency

.xray.logger.XrayLog
;
log= new XrayLog();
trace(log.debug("stringMessage" [
, object]));
trace(log.info("stringMessage"[ ,
object]));
trace(log.warn("stringMessage"[, object
]));
trace(log.error(&quot;stringMessage";[, object
]));
trace(log.fatal(&quot;stringMessage"[, object ]
));
trace("What's obj got!?";);
Traces are correctly outputed but the log differenciation doesn't seem to work...


 

If you have some time to help me, it will be very kind of you...

 

Thank you in advance.

 

 

Best regards.

 

Cedric Madelaine (aka maddec)
analogdesign.ch


 

 

 


_______________________________________________
xray mailing list
xrayosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]

_______________________________________________
xray mailing list
xrayosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]
_______________________________________________

xray mailing list
xrayosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org



_______________________________________________
xray mailing list
osflash.org">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]
Re: output panel filters problem.
user name
2007-03-06 13:25:26
Hi,
there are (at least) 2 issues that play a part here, when you start the system and do a ClassFinder.registerAll(), it caches all info it can find. But only for AS2 classes. So dynamic methods that are added later, timeline scripts/methods, classes that are loaded at a later point through a subswf might form a problem, since if the ClassFinder isnt triggered again, the info is not available (you can see this happening in Xray in the current ClassFinder btw, when undefined shows up for the classname).
 
With respect to new classes being loaded due to a subswf being loaded, the current ClassFinder contains a fix for that, it kinda checks when its cache is outdated and then goes at it again. However it would be better to include the registerAll call as part of the subswf';s loading process.
 
With respect to function beings dynamically added, there is no fix for that, unless you want to call registerAll after each dynamic function (which you really dont want to do). However this scenario doesnt happen a lot. In addition in these cases you can simply provide this information manually, so instead of Logger.log ("foo"), you'd do Logger.log("foo&quot;, "MyClass", "MyCustomFunction").
 
For the nominal case, where you program nicely (^^) I haven't had misses yet. I've been using this system for a year now and really love it. It's very nice to just say Logger.markEntry(arguments) and then have a log that says:
MyClass.methodA was called from AnotherClass.methodB with arguments (..,...,..,..)
without having to type that all by hand.
&nbsp;
Ofcourse I'm stuck in a certain way of developing stuff, so I doubt that all the testcases have been covered.
 
erm that was question one...
&nbsp;
I agree with your ideas on Xray and logging. The thing with logging is, a) you probably don't want the full logging 100% enabled in your production version, so you either want to disable it completely, or configure it properly so it doesnt bog your system down b) you dont want change 20 settings in an interface just to configure your log each time you run it.
All in all good logging gets complicated very quickly I think, and before you know it you are wandering down all sort of evil paths^^.
 
We are currently redoing the architecture on a system I've been working on for the past 3 years, and the whole logging thing is part of that. What we are planning on is using our own logger, with runtime configs through xml files or specific classes, and then triggering these predefined settings through the xray interface.
SOOO for example, I write a filter class for my xflas logger, and i tell it to define a table with all the packages in my current system, and i store a boolean for it, telling it whether it should log statements from that package or not. So I have:
myPackageA : true
myPackageB : true etc
Now I store this table in _global.logConfig for example.
 
Using Xray i simply navigate to _global.logConfig, get the table listing and use the standard interface to toggle the true/false flags.
At least thats the idea^^. So Xray is an essential part of making that work, but not responsible for the logging implementation.
&nbsp;
l8r!
JC
&nbsp;

 ;
On 3/6/07, John Grden < neorileygmail.com">neorileygmail.com> wrote:
oh man yeah, I totaly whizzed on remembering ClassFinder!  Thanks for bringing that back up

One thought is: Does that always work? ; using arguments.caller?&nbsp; Seems like my testing that was sooooo hit and miss half the, but then again, that was a long time ago.  What's your take on that?

As for using other loggers, I've thought the same thing lately - Xray's logger is "good", and the recursion is nice, but I don't focus on that. ; Xray is more about runtime control and inspection rather than traditional logging.&nbsp; I was considering how I might just leave the logger with an open API for runtime control on package filtering and levels.

thoughts?

Hi,
John, why do you need mtasc or as3 to get the packages? Using the ClassFinder you are already using and the FunctionFinder, this info is readily available in as2 (and cached). Maybe not in 100% of the cases, but anyway, it might help^^.
I know the note on xflas2 still says the f...g thing is in beta^^ but it is actually pretty stable.
 
Check the last version of these files on http://www.objectpainters.com/xflas2/
&nbsp;
How it basically works is like this:
a function calls Logger.log ("foo");
 
The ClassFinder adds info to each class about its classname and package name, the FunctionFinder adds info to each function concerning its defining class.
&nbsp;
In your log call you look up the calling function, ie arguments.caller
then you need two lookups:
myClass = FunctionFinder.getFunctionClass (arguments.caller);
myClassPath = ClassFinder.getPath(myClass);
 
Note that if you have:
&nbsp;
class a.b.c.d.MyClass {
   function myMethod() {
   ; &nbsp; Logger.log("foo&quot;);
}
}
 
you could actually get Logger.log("foo&quot;) to say, okay this call came from "a.b.c.d.MyClass.myMethod&quot;, and then you can filter away.
This is exactly how it happens in xflas2.
 
I know we've been down this road before but feel free to copy anything usable. If you do want to take a look at the barebones of it, you'd need to check out the Logger / SendInfo / ClassFinder &; FunctionFinder classes. Packagefiltering, methodname filtering etc is all included as well though. And like I said, you dont need mtasc or as3 to do it.
 
An other option would be ofcourse to not include anything like this, and simply let people download the loggers of their choice. Most of them support Xray and if they dont... WELL THEY SHOULD coz it roxxors
 
Up the irons!
JC

 
On 3/6/07, John Grden <gmail.com" target="_blank"> neorileygmail.com > wrote:
OH man, I was just going through my Xray email and I saw this!!&nbsp; So sorry I didn't reply sooner!

below...

On 2/26/07, analogdesign <analogdesign.ch" target="_blank"> newslanalogdesign.ch > wrote:
>> You're the first person to bring it up ;)
Ok so I've right to go nuts ;)
 
1:
package filtering!! That's a must have feature ;) How do you intend to add this regarding to the GUI a radio button+ a textfield&nbsp;?
( ) DEBUG ; ( ) INFO  ( ) WARN  ( ) ERROR ; ( ) FATAL ; &nbsp;  ( ) PACKAGE [whichPackage to filter]
a radio button + a combobox automatically filled ?

Good questions   the answer is: I don't know yet.  I have 2 other guys bugging me for Package filtering (including myself) and I just have to sit down and think it out.  Part of the problem with it is, you have to use MTASC to compile or with the as3 version, you have to use the debug player to get packages.&nbsp; But that's all doable.&nbsp; Just need to sit and "do&quot; it.
 

2:
bug report:
when I put in the search text field a string with a . the string isn't searched:
 
myPackage ---> search occurs
myPackage. ---> search doesn't work
 
sometimes search doesn't work and select random string in the output panel. I've remarked the same behaviour in Flashout logger, so that's surely not caused by xray.

Yeah, I'm sure I can fix that up much cleaner.&nbsp; I really just took it from the old interface and ported the functionality to as3/flex2. 
 

3:
feature request:
 
A:
It could be very useful to have a search field which "keep an history of 10 previews searches " (a bit like firefox does)

So, would this just be a history of the last 10 search phrases?
&nbsp;

B:
next to [ ] case sensitive: what about adding toggle autoscroll? What about adding&nbsp;clear&nbsp;panel on new connection established?

It does auto scroll, maybe I'm missing what you're asking?

what's a clear panel? OH do you mean "clear trace output when new connection occurs&quot;? yeah, I've wanted that too, but I think adding an Xray call instead might make more sense.&nbsp; That way, the developer can control if Xray's output is cleared or not when the app starts, OR when an app hits a certain section
 

C:
I definitely prefer the way you choosed to output each trace occurence over flashout logger. I mean including the class path + function where it was called.
Also the "show output&quot; check box and the way it behave.
Flashout logger: when you pause trace output, it caches all the traces, when you reenable&nbsp;trace outputs you have a flood of cached traces that most of the time kill eclipse...
 
Don't you think that show output should be by default on when you restart xray?

It's a toss up - I could turn it back on.  Right now, it just remembers your last choice.&nbsp; I'm open to changing that though ;)
 

Don't you think that the check box is a bit confusing for this feature? What about for example a "play, stop button&quot; ?
 
D:
Do you plan to add a background color for each trace occurence? Whether a light odd/even visualisation or/and a background color by log category?

Yeah, i'd like to, but to do that (correct me if I'm wrong) I have to do html text for the formatting.  That slows down the output even faster/sooner than regular text. ; IE: when you get alot of traces happening, it takes up more CPU to render all of that then regular text. ; THe original interface used to do that btw
 

E:
what about adding differenciation between traces which are called on fly from the xray interface and those which are in classes?

Yeah that sounds good
 

I haven't much experience with other loggers, but I feel like I prefer to have all centered in one tool like xray.
Which logger do you use? And do you think that xray can support all the must have features of a perfect logger? (I trust you on that point ;) )

I use Xray's logger of course ;)  All the features?&nbsp; Not yet, but it will have 90% of what most developers look for. I think that other 10% would be items like accomodating another logger or trace utility, but as for functionality (barring, of course, breakpoints), it'll have the features.&nbsp; If anything, it'll have more "runtime" options that other loggers aren't able to do without a proper interface to control them at runtime.&nbsp; Make sense?
 

Waouw one more time a bit long ;)
Sorry for that.
 
Have a nice week end!
 
 

Best regards.

Cedric Madelaine (aka maddec)
analogdesign.ch

 


Envoy�&nbsp;: vendredi, 23. f�vrier 2007 14:26

� ;: osflash.org" target="_blank">xrayosflash.org
Objet&nbsp;: Re: [xray] output panel filters problem.

 
you're right, there's an issue with that unfortunately.  I was waiting to put in package filtering before fixing that bug ;(

You9;re the first person to bring it up ;)

On 2/23/07, analogdesign <analogdesign.ch" target="_blank">newslanalogdesign.ch > wrote:
Hello John,
 
 
I'd like to use the Xray output instead of the flashout logger panel.
 
Traces are correctly catched by xray output panel. But the filter thing with DEBUG, INFO, WARN, ERROR, FATAL, doesn't filter anything...
 
XRAY
interface version: Windows SWHX Projector v 2.0
connector version: 1.6.2
 
 
Based on you sample Code
import com.blitzagency

.xray.logger.XrayLog
;
log= new XrayLog();
trace(log.debug("stringMessage" [
, object]));
trace(log.info("stringMessage"[ ,
object]));
trace(log.warn("stringMessage"[, object
]));
trace(log.error(&quot;stringMessage&quot;[, object
]));
trace(log.fatal(&quot;stringMessage"[, object ]
));
trace("What's obj got!?";);
Traces are correctly outputed but the log differenciation doesn't seem to work...


 

If you have some time to help me, it will be very kind of you...

 

Thank you in advance.

 

 

Best regards.

 

Cedric Madelaine (aka maddec)
analogdesign.ch


 

 

 


_______________________________________________
xray mailing list
osflash.org" target="_blank">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]

_______________________________________________
xray mailing list
osflash.org" target="_blank">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]
_______________________________________________

xray mailing list
osflash.org" target="_blank">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org



_______________________________________________
xray mailing list
osflash.org" target="_blank"> xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]

_______________________________________________
xray mailing list
osflash.org"> xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )