8

Filtering Traces from Central with the Trace Panel

 3 years ago
source link: http://www.mikechambers.com/blog/2003/12/12/filtering-traces-from-central-with-the-trace-panel/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Filtering Traces from Central with the Trace Panel

Friday, December 12, 2003

If you have used the Central trace panel, you may have noticed the “App Name Filter” text field in the bottom left of the panel. This is used to filter trace messages coming from Central so you only see messages coming from your application.

So, how do you use this? It is actually pretty simple.

First, you need to set a global variable in your App / Agent / Pod that tells Central your application name. This is done using:

Central.tracer.appName

So, for all of my apps, I place :

Central.tracer.appName = "mesh";

at the root. This value will be passed by Central as the second argument to the trace panel.

Then, in the trace panel, you enter the appName in the App Name Filter textfield. That is all there is to it.

There are a couple of things to keep in mind:

  • Before releasing your application, you should publish it with Omit Trace Actions on.
  • Before releasing your application, you should comment out the Tracer.app name code.
  • If you have multiple Agents running from your domain, the last one loaded will set the Tracer.appName value.

Also, you can set Tracer.appName to be any value (a string, array, etc…) and it will be passed to the Tracer panel. The panel from Macromedia only recognizes strings for the appName value, but the complete source code for the panel is included on the SDK, so you can modify it accept other data types.

You can download the Central Trace panel as part of the Central SDK. You can also download standalone versions for OS X and Win.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK