You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Scott Deboy <Sc...@VirtualDesign.Net> on 2003/04/19 18:40:35 UTC

UI comments? Use of 1.4 JDK and LoggingEvent properties

I've written a logging UI that takes the good ideas implemented by Oliver Burn in Chainsaw and adds features that I felt were needed to stop logging to both text files and Chainsaw (wanted to get away from having to use grep on log files)...

There are two issues I would like the dev list's input on.
-----
#1
I've included support for regular expression-based display and colorizing filters but built-in support for regexp is only recently available with the 1.4 JDK in the java.util.regex package.  

Question:  Should I remove the 1.4 dependency?  Is the benefit of 1.4 users not needing to install a separate regexp package (ORO) outweighed by the usefulness of a 1.2 compiled UI and the separate download requirement?  

If neither are available, the app will still work - the user just loses the ability to define regexps for filtering - partial text matching is used instead.

Should the UI be jarred separately?  I understand the benefit of having a UI and the core classes available as a single download.

There are other benefits to supporting 1.4 - better performance of the collections classes and a scrolling JTabbedPane come to mind.

----
#2
One of the main differences between the new UI and Chainsaw is the new UI's support for event 'routing' to separate panels in a JTabbedPane.  Panels in the JTabbedPane are uniquely identified by the source machine and a user-defined 'application' property.

To route the events to separate panels, two properties are added to the LoggingEvent by the appenders - 'log4japp' and 'log4jmachinename'.

The log4japp property is a JavaBeans-style property on the Socket and UDPAppenders which can be configured through a param on the xml file.  

If a log4japp system property exists, the appender property and the system property are combined - provides the ability to define the app name at runtime.

The machinename property is added automatically.  Only the first part of the FQDN is used if it can be resolved.  If it can't be resolved, the IP address is used.

Question:  Are these 'universal' properties (useful to anyone consuming loggingevents), and therefore setting these properties on all loggingevents via the appender is OK?  If not, is there a recommendation on how to get them added when the target is known to be the logging UI?

If neither property are provided in the loggingevent (for example, if someone is using a current log4j.jar without updated appenders), all events end up in the UI on a tab named 'unknown'.

Comments?

Thanks
Scott