Summary: | Chainsaw mixes files in same panel | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | Rob Oxspring <roxspring> |
Component: | chainsaw | Assignee: | log4j-dev <log4j-dev> |
Status: | NEEDINFO --- | ||
Severity: | major | CC: | thorbjoern |
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Rob Oxspring
2004-08-27 11:51:17 UTC
The tab events go to is totally dependant on the value of the application-wide property "Tab Identifier". What is yours set to? Try using: PROP.hostname - PROP.application as the tab identifier and see if that helps. This should create a new tab for each file. I'm curious to know what your property value is set to. The tab is set to the default "PROP.hostname - PROP.application" but I don't see what this has to do with anything - where would hostname and application come from in the files anyway? It looks like it's using file.getName() to name the tabs, which then get mixed because files in different directories can have the same name. When loading files into Chainsaw, the paths weren't included in the tab identifier because it had the potential of creating tabs with really long names (this is also because I didn't consider the fact that folks would be loading a file with the same name but from different locations). I agree this should be changed, probably providing the complete file path, in case folks want to load have logs from separate machines with the same file name and the same path. As Paul mentioned, events are routed to tabs based on attributes of the event. As files are loaded, 'hostname' and 'application' properties are added to the event to facilitate this routing to a unique tab. Examine the detail pane for a selected event. the 'Properties' line includes 'hostname' and 'application' entries, and that's how events are routed. There's more to this. If the XML log file contains events that aleady have property values for the 'application' and 'hostname' keys, then they are NOT overriden with the name of the file. Not sure what we should do here, because it's probably bad practice to 'clobber' original property values, but I can see the use-case where you want each file loaded into it's own tab. Is it correct that the tab label is the one determining where event should go, even when loaded from different files? What would be the appropriate way to deal with this issue now that some time has passed and other parts of the code has developed too? Fields on the event (along with the tab identifier specified in the application-wide settings screen) determine which tab events are routed to. If a file is loaded (via file/load or through the LogFilePatternReceiver), two properties are added to each of the file's events. If the default tab identifier is in use, these additional properties will cause the file's events to route to its own tab. There is also a mechanism by which events can be routed to multiple tabs: via the 'create custom expression logpanel' menu (essentially creates a 'view' of events on other tabs in a new tab). Not sure if this is what you were asking, but I thought I'd try to explain how the routing works. Is this still an issue? |