Issue Details (XML | Word | Printable)

Key: LIBOMV-484
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Jim Radford
Reporter: Shack Dougall
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
libopenmetaverse

GridProxy needs blacklist

Created: 10/Apr/09 11:40 AM   Updated: 17/Apr/09 02:36 PM
Component/s: GridProxy/WinGridProxy
Affects Version/s: None
Fix Version/s: 0.6.2

File Attachments: 1. Text File blacklist.txt (1.0 kB)
2. Text File GridProxy-Patch-0-6-1-1-Shack.patch (4 kB)
3. Text File GridProxy-Patch-trunk-Shack-final.patch (4 kB)
4. Text File GridProxy-Patch-trunk-Shack.patch (4 kB)


Environment: All


 Description  « Hide
GridProxy has a --log-whitelist option that will "log packets listed in a file, one name per line". This is really useful.

However, when I'm dealing with unknown situations, I am much more likely to know the messages that I don't want to see. It would be much more useful to have a --no-log-blacklist option that would allow you to specify the messages that you do not want to be logged.

This would let me get rid of the million LayerData, sound, agent effect, and similar messages without risking that I miss something that might be relevant.



 All   Comments   Change History   Subversion Commits   Patches      Sort Order: Ascending order - Click to sort in descending order
Shack Dougall added a comment - 14/Apr/09 07:45 PM
Adding a patch that implements a blacklist.

The patch was created on libsl/Programs/GridProxy and includes the following changes:

  • blacklist feature added to Analyst plugin and associated help comment added to GridProxy
  • #DEBUG_CAPS uncommented in GridProxy because I think this should be the default.
  • GridProxyLoader modified to give ProxyFrame a new constructor that allows an instance of ProxyConfig to be passed in. This makes it possible to change the userAgent and author strings from the default.

Shack Dougall added a comment - 14/Apr/09 07:46 PM
Oh, and I don't think it is an issue in this case, but the patch was created from 0.6.1.1

Shack Dougall added a comment - 14/Apr/09 07:52 PM
Attaching an example blacklist file that I'm using. It's amazing how effective using a blacklist is. It reduces what would be a 1.5 MB log file to about 200KB and gets rid of all the noise.

I use --log-all and --no-log-blacklist together. log all to log all the messages and the blacklist to remove the ones I don't want.


Shack Dougall added a comment - 14/Apr/09 07:53 PM
One other small change is in the patch (just remembered).

Analyst prints the name of the packet, e.g.,

ReplyTaskInventory
<-- 216.82.21.12:12035 746 [ Rel ]
– InventoryData –
TaskID: a1e5566b-8454-87ab-73ae-5989b2d80fc9
Serial: 47
Filename: inventory_273433dc-eb74-fee3-b4a0-7dff53634bfe.tmp
Length: 70


Jim Radford added a comment - 14/Apr/09 11:39 PM
Hi Shack,

What version of the library is this patch based on? The reason I ask is because Analyst was previously modified (actually the helper) to print out the proper packet name

couple coments for you:
enabling DEBUG_CAPS is a hack, the proper way to do this is to modify Analyst and use the ProxyFrame AddCapsDelegate to subscribe to the capability you're interested in and log it to the console. This give people the option of turning on and off events just as is possible with Packets.

Just so you're aware, I'm working currently on a GUI version of GridProxy which will provide a much richer experience for both Packets and Messages, however if you can update your patch to take those things into consideration I mentioned above I'll gladly get it applied to trunk.

Jim


Shack Dougall added a comment - 15/Apr/09 06:09 AM
Jim,

I say in my comment above that it is based on 0.6.1.1.

And of course, I know that DEBUG_CAPS is a hack, it is an undocumented hack that is nearly impossible to discover. I was floundering and making no head way on my work until you told me about it, but even then it was somewhat painful to find out about it.

But I'll leave DEBUG_CAPS turned off.

I'll get trunk and make a patch from that, that should fix concerns about Analyst and the proper packet name.

I'm glad to hear that GridProxy is getting a GUI upgrade.


Shack Dougall added a comment - 15/Apr/09 06:54 AM
Okay, uploading a new patch based on trunk that I just downloaded.

A couple of comments for you:
1) The helper might have been modified to print out the packet name, but Analyst apparently doesn't use the helper, so my change is still needed.
2) Someone beat me to it. In trunk, DEBUG_CAPS is already uncommented.

So, the net result is that the new patch is almost identical to the old patch, except:

  • it doesn't uncomment DEBUG_CAPS (but DEBUG_CAPS is already uncommented in trunk).
  • I fixed one typo in a WriteLine that was erroneously printing "whitelist" instead of "blacklist".

Shack Dougall added a comment - 16/Apr/09 10:54 AM
Regarding analyst printing the packet name. I think I understand what's going on. I'm running trunk from yesterday.

Yes, the helper prints out the packet name and yes, analyst uses the helper. However, the helper prints it out in a strange way (at least for me). I didn't even notice it the first few times that I was looking at the output.

I was expecting to see something like this:

– LogoutReply –
<-- 216.82.21.12:12035 2469 [ Rel ]
– AgentData –
AgentID: 1ce91bab-b3a8-4af3-9763-97696b2ab324
SessionID: cb0ea727-b17a-4ffa-93a2-c0c4930a2816
Length: 32
– InventoryData –
ItemID 62286793-95ef-a4d9-8fa5-44016d1054e4

But what the helper prints out in yesterday's trunk is something like this:

<-- 216.82.21.12:12035 2469 [ Rel ]
– AgentData –
-- LogoutReply –
AgentID: 1ce91bab-b3a8-4af3-9763-97696b2ab324
SessionID: cb0ea727-b17a-4ffa-93a2-c0c4930a2816
Length: 32
– InventoryData –
-- LogoutReply –
ItemID 62286793-95ef-a4d9-8fa5-44016d1054e4

Instead of printing the packet name at the top of the packet, it prints the packet name at the top of each block in the packet. Maybe that's the expected behavior, but I didn't even notice it at first. And once I did notice it, it seems annoying.

So, I guess I will take out my line that prints the packet name. Should I file a separate ticket on the unexpected behavior of the helper? Or is that really the way that it is supposed to work?


Jim Radford added a comment - 16/Apr/09 11:15 AM
Hiya shack, good catch on the location of the packet name - no, that should be placed in a more obvious place and not repeated, was a quick fix for one of the opensim guys I threw in there. the Helper that displays the packet is getting some work done to it as well (currently in WinGridProxy) but eventually the finished pretty version will move back to Helpers. I want to not only be able to print it to a string, but provide an object which is more queryable than a bunch of strings.

The first version of WinGridProxy is comitted to trunk (available in Programs/) its a work in progress, no state is saved between sessions yet but thats coming, You can look at the code to see how I subscribed to the Caps events to display them. This could be added to Analyst without too much difficulty.

I accidentally left DEBUG_CAPS uncommented on a recent commit, that has however been corrected as of lastnight.

Regards,
Jim


Shack Dougall added a comment - 16/Apr/09 11:41 AM
Uploading GridProxy-Patch-trunk-Shack-final.patch

Jim, this should be the one. No changes to DEBUG_CAPS. No changes to analyst packet name printing.
The patch should be applied to Programs/GridProxy.

That's it. Shack has left the building. LOL.

WinGridProxy looks great, Jim!


Jim Radford added a comment - 17/Apr/09 01:07 PM
Applied to trunk r2624, Thanks!

Let me know if you need some assistance with the CAPS_DEBUG alternative I spoke of


Shack Dougall added a comment - 17/Apr/09 02:36 PM
Thanks, Jim!

I don't plan to do anything more with GridProxy. I'm knee deep in RezScript, UpdateScriptTask CAP, and related messages to rez and compile scripts in task inventory. I'm working on trunk now, so I'm building on top of the recently added InventoryManager.CopyScriptToTask() method.

Today, I got my first script to rez in task inventory, set its permissions, upload lsl and start running in Mono. Hopefully, I'll submit a ticket on it next week with substantial info on what I discovered and how I did it and possibly a patch.