[xray] Logging Was: Where did the xray + mtasc tutorial go?

Chris Allen mrchrisallen at gmail.com
Wed Aug 16 17:19:16 EDT 2006


Yep,

John and I just finished a phone meeting going over the logging
implementation. I think you guys and gals are going to be psyched!
John said he will be working on this tomorrow and I will be helping
where I can.

Anyway, consider the current implementation temporary, there will be
some changes to the API and how it is used. Here's a sample of the new
way of logging to be implemented soon:

XrayLogger.setLevel(XrayLogger.DEBUG);
var log:XrayLogger = new XrayLogger();
trace(log.debug("What's obj got!?", obj));
trace(log.info("this is some information"));

As you Java developers will notice, it's pretty similar to Log4J, yet
it's just wrapped in a trace().

In addition, we are hoping to work with the guys that are doing Zeroi
http://osflash.org/zeroi to get the XML config file implementation
that they are using hooked up with Xray logging.

Also, the Flex 2 interface is going to have some nifty UI controls for
filtering out packages and setting the log levels at runtime.

I'm very excited about this new addition to Xray, so just wanted to
share. Thoughts, opinions, suggestions and questions are welcome of
course.

-Chris

On 8/16/06, John Grden <neoriley at gmail.com> wrote:
> ;)
>
> Well, I hadn't made an announcment because Hans just started showing me his
> logging solution and I'm keen on trying it out since we can get package info
> AND method without Mtasc.  Plus the as2lib stuff added 15k to the
> connector.  So, if there's something that does the same job, but is smaller
> and has that extra bit of info, I wanna check it out.
>
> hence why I hadn't announced the log levels/packages ;)  Also, I haven't
> done anything with the interface to support the levels/package filtering ;)
>
>
> On 8/16/06, Chris Allen <mrchrisallen at gmail.com> wrote:
> > Well John sure is efficient. :-)
> >
> > The documentation on the logger is already there:
> > http://www.osflash.org/xray#usage_8.11.2006
> >
> > Sorry I missed that in my last post.
> >
> > On 8/16/06, Chris Allen <mrchrisallen at gmail.com> wrote:
> > > On 8/16/06, Leif Wells <leif.wells at gmail.com> wrote:
> > > > Just to be clear to anyone else trying this for themselves.
> > > >
> > > > 1) you have to import the XrayLoader class in your main class:
> > > > import com.blitzagency.xray.util.XrayLoader;
> > > > (Chris just left this out of the code)
> > >
> > > Yeah, sorry about that.
> > > >
> > > > 2) Follow Chris' instructions about the placement of the
> > > > xrayConnector_1.6.swf file. It does need to be in the same folder as
> you
> > > > MTASC output file. (I missed this fact the first attempt).
> > > >
> > > Well you can always change the path to point to where ever you have it
> located
> > > e.g. utils/xray/xrayConnector_1.6.swf
> > >
> > > > Thanks to you, Chris, for helping out.
> > >
> > > No problem at all! I'm glad I could help.
> > >
> > > >
> > > > Now all I need to do is clean up all my trace statements.
> > > >
> > >
> > > Well trace() statements are getting a major uplift. John has just
> > > added some really nice logging stuff which allows one to use levels
> > > and filter what packages you want shown. We will be working on
> > > cleaning this up and creating some documentation on how to use it.
> > >
> > > Stay tuned!
> > >
> > > > Leif
> > > >
> > > >
> > > >
> > > >
> > > > On 8/16/06, Chris Allen < mrchrisallen at gmail.com> wrote:
> > > > > hey Leif,
> > > > >
> > > > > I know that the URLs on Blitz's site are all changed now, so I'm not
> > > > > sure where that thing is. It's probably time to update that thing by
> > > > > now anyway. I will talk to John about doing a new one after we have
> > > > > finalized the new logging stuff.
> > > > >
> > > > > For now, it's pretty simple to build an Xray enabled application
> with
> > > > > those tools. Here is a brief example to get you started:
> > > > >
> > > > > Create a main class that MTASC will target, something like this:
> > > > >
> > > > > class com.tomsnyder ,MyApp
> > > > > {
> > > > >
> > > > >         public function MyApp()
> > > > >         {
> > > > >                 loadXray();
> > > > >      }
> > > > >
> > > > >     public static function main():Void
> > > > >     {
> > > > >         var myApp:MyApp = new MyApp();
> > > > >     }
> > > > >
> > > > >         private function loadXray():Void
> > > > >         {
> > > > >
> XrayLoader.addEventListener(XrayLoader.LOADCOMPLETE,
> > > > this,
> > > > > "xrayLoadComplete");
> > > > >                 XrayLoader.addEventListener(XrayLoader.LOADERROR,
> this,
> > > > "xrayLoadError");
> > > > >                 XrayLoader.loadConnector ("xrayConnector_1.6.swf");
> > > > >         }
> > > > >
> > > > >         private function xrayLoadComplete():Void
> > > > >         {
> > > > >                 _global.tt("xrayLoadComplete called");
> > > > >
> > > > >              //start your application logic here...
> > > > >
> > > > >         }
> > > > >
> > > > >         private function xrayLoadError():Void
> > > > >         {
> > > > >                 trace("an error occurred loading the Xray
> connector");
> > > > >         }
> > > > > }
> > > > >
> > > > > Then have MTASC target that class and it's main() method. I'm using
> > > > > Ant to run MTASC, but I know that FDT has its own built in stuff if
> > > > > you want to use that.
> > > > >
> > > > > As long as xrayConnector_1.6.swf is in the same directory as your
> > > > > target SWF it should work just fine.
> > > > >
> > > > > I hope that helps. feel free to ask more specific questions if you
> have
> > > > any.
> > > > >
> > > > > -Chris
> > > > >
> > > > >
> > > > > On 8/16/06, Leif Wells <leif.wells at gmail.com> wrote:
> > > > > > All,
> > > > > >
> > > > > > I am trying to get FDT, MTASC, XRAY and zeroi to work together and
> was
> > > > > > looking for the tutorial for using mtasc + xray that used to be on
> the
> > > > Blitz
> > > > > > blog.
> > > > > >
> > > > > > Anyone have another tutorial?
> > > > > >
> > > > > > Leif
> > > > > >
> > > > > > _______________________________________________
> > > > > > xray mailing list
> > > > > > xray at osflash.org
> > > > > >
> http://osflash.org/mailman/listinfo/xray_osflash.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > xray mailing list
> > > > > xray at osflash.org
> > > > >
> http://osflash.org/mailman/listinfo/xray_osflash.org
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > xray mailing list
> > > > xray at osflash.org
> > > > http://osflash.org/mailman/listinfo/xray_osflash.org
> > > >
> > > >
> > > >
> > >
> >
> > _______________________________________________
> > xray mailing list
> > xray at osflash.org
> > http://osflash.org/mailman/listinfo/xray_osflash.org
> >
>
>
>
> --
> [  JPG  ]
> _______________________________________________
> xray mailing list
> xray at osflash.org
> http://osflash.org/mailman/listinfo/xray_osflash.org
>
>
>



More information about the xray mailing list