Re: Summary of Network logging for Java desktop application
Will Sargent <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
Log4J's JMX support is very limited, but it is possible to alter it on the fly. Looked into it myself, although I never implemented it: http://blogs.averconsulting.com/2006/12/13/changing-log4j-logging-levels-dynamically.aspx http://technology.amis.nl/blog/?p=1238 http://www.devx.com/Java/Article/32359/1954?pf=true I wouldn't be surprised if log4j 1.3 had some JMX MBeans, but it was not going anywhere and was eventually cancelled outright. Will. On 10/24/07, Ted Neward <[email protected]> wrote: > Bear in mind that java.util.logging has a working JMX MBean for dynamically > turning up/down the logging levels (point JConsole at your desktop app and > look at the MBeans tab to see what I mean), which can be enormously powerful > in a running app server (less so for a client-side app), and log4j's JMX > support appears to be essentially of alpha quality or nonexistent (Google > isn't clear on this point). I'm not sure why log4j has such spotty JMX > support, given it's (IMHO) better support in other areas of logging, but > c'est la vie. > > Ted Neward > Java, .NET, XML Services > Consulting, Teaching, Speaking, Writing > http://www.tedneward.com > > > > -----Original Message----- > > From: Discussion of advanced Java topics. [mailto:ADVANCED- > > [email protected]] On Behalf Of Frank Harper > > Sent: Wednesday, October 24, 2007 5:29 AM > > To: [email protected] > > Subject: [ADVANCED-JAVA] Summary of Network logging for Java desktop > > application > > > > I thought a recap on logging for Java desktop applications might be > > helpful. > > > > Will Sargent and Vitor Buitoni both recommended using log4j. Log4j has > > several client and server side options one of which is a unix syslog > > appender. The fire and forget nature of unix syslog which runs over > > unconfirmed UDP is particularly appealing to me since some machines on > > which > > the app is installed might not be able to reach the logging server at > > all. > > Using syslog should reduce the risk of destabilizing the app as > > mentioned by > > Peter Booth. One concern with using log4j, is that we are currently > > using J2SE > > logging framework provided by Sun, switching to log4j would require > > updating > > logging code throughout the app. > > > > Jeff Kesselman said that he was perfectly satisfied with the J2SE > > logging > > framework, but didn't say what he recommended using on the server side. > > > > Peter Booth recommended Capistrano (http://www.capify.org/), which is a > > Ruby > > based tool for automating tasks using SSH. One thing I forgot to > > mention is > > that my app runs on Windows. If I have understood Peter's suggestion, > > correctly implementing his idea with Capistrano would require > > installing an > > SSH server on each Windows box on which the my app runs. In my case, > > this is > > not a realistic option. > > > > Thanks to all those who took the time to reply. > > > > Frank Harper > > On 10/20/07, Peter Booth <[email protected]> wrote: > > > > > > Do you really want to make your application's reliability and > > > performance > > > dependent on the health of the network logging mechanism? If > > > > > > Call me conservative but I would much prefer to log locally and use a > > > decoupled mechanism for log file aggregation. Capistrano, for example > > > can make this trivial across OSes. > > > > > > Peter > > > > > > On Oct 19, 2007, at 10:41 AM, Frank Harper wrote: > > > > > > > I have a java desktop application that is installed locally on > > users > > > > machines via Java Web Start, and would like to centralize the > > > > logging to > > > > facilitate diagnosing bugs. > > > > > > > > The app uses the standard java logging framework that comes with > > J2SE. > > > > Apparently with this logging framework the standard way to do > > network > > > > logging is to use java.util.logging.SocketHandler. I couldn't find > > any > > > > complete examples on the Web, and the documentation is completely > > > > mute about > > > > what should be running on the server side to collect the > > > > information sent by > > > > SocketHandler. > > > > > > > > So, have any of you done network logging in Java, and what software > > > > did you > > > > use? Did you use J2SE+SocketHandler, classic unix syslog, Log4J, or > > > > something better/different? And in particular what software did you > > > > run on > > > > the log server? > > > > > > > > Thanks > > > > Frank > > > > > > > > =================================== > > > > This list is hosted by DevelopMentor(R) http://www.develop.com > > > > > > > > View archives and manage your subscription(s) at http:// > > > > discuss.develop.com > > > > > > > > > > =================================== > > > This list is hosted by DevelopMentor(R) http://www.develop.com > > > > > > View archives and manage your subscription(s) at > > > http://discuss.develop.com > > > > > > > =================================== > > This list is hosted by DevelopMentor(R) http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.5.488 / Virus Database: 269.15.3/1082 - Release Date: > > 10/20/2007 2:59 PM > > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.488 / Virus Database: 269.15.3/1082 - Release Date: 10/20/2007 > 2:59 PM > > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com