Sunday Jan 23, 2011

Log and Collect (in GlassFish 3.1)

Real log

Naman had two blog entries which haven't been yet highlighted here. The first one is from December and covers "Configuring Log4J for use in GlassFish 3.1" (the tricky part is where should live). This is a very popular request, so add it to your bookmarks.

Whether you use log4j, java.util.logging or sl4j, you can use the GlassFish Log Viewer accessible from the Web Console, but starting with 3.1, Naman shows how you'll be able to use asadmin collect-log-files.

This new CLI command is fairly straightforward with the ability to select an instance, a full cluster and provide an output file name :
    asadmin collect-log-files [--help] [--target target] --outputfilepath pathname
This returns ZIPped log archives named (one file for an entire cluster).

Thursday Sep 03, 2009

Logging Improvements in GlassFish v3

Carla has provided an overview of 3 new logging related commands in GlassFish v3:


• asadmin rotate-log
• asadmin list-logger-levels
• asadmin set-log-level --level level logger-name

Upgrade to the latest GF v3 and try it out.

Wednesday Dec 10, 2008

Custom Loggers in GlassFish v3


Logger and logging are fairly popular topics in the GlassFish USER list. Earlier Carla reported on the Changes for GFv3 Prelude; she promised more details and they are here in a new entry on Adding Custom Handlers.

In the entry Carla describes two different ways to customize log handlers. One is to write an HK2 service for the handler the other is to write a Java class for java.util.logging.

Check out the entries and provide feedback to Carla at her blog.

Wednesday Oct 29, 2008

... GF v3 Prelude One Pager, Author! Author!, GFv3 Logging, VirtualBox at Amazon, New Shoal, Windows News

A compilation of today's news of interest:

Radio Receiver Icon

Masoud is ahead of us! Check out his One-Pager on GlassFish v3 Prelude. The actual release of GFv3 Prelude will be split into two parts: the bits will go out this week but the special webinar is not until next week, on November 6th.

Packt Publishing is looking for an author to write a new book focused on the administration features in GlassFish server to complement their Java EE5 Development using GlassFish Application Server. Check out the Authors info, and contact Kshipra Singh (kshipras at packtpub dot com) if interested.

Carla writes about Logging features in GlassFish v3 Prelude. Overall, logging in GFv3 will now use the JDK logging facility but not all features are implemented yet, so check on Carla's writup to see the details and plans.

Shoal is getting close to the 1.1 release, as part of the preparations for GFv2.1 and Sailfin. Check out Changelog, Shreedhar's Summary Note, and Download Page.

VirtualBox is now available for retail purchase at (not in the US store, though). It's not yet a best seller; as of this writing, it is ranked 15,244 - let's see how if it goes up...

Plenty of Microsoft news aligned with PDC 2008. There is now a pre-Beta Windows 7 that includes plenty of consumer-friendly features like improved navigation and taskbars and multi-touch gestures, as well as lightweight, web-friendly versions of Office products. They have also announced their Cloud offering, Azure, but I've not had much time to check it except to note that Yousef is involved. On a more techie side, Rajeev reports that MS will add SAML 2 Support, which is good news for OpenSSO et al.

Monday Oct 08, 2007

GlassFish at SourceForge - Human Readable GlassFish Log

Human Readable GlassFish Log

I found the Human GlassFish Log Project doing my daily News crawl. I don't know much about it although it seems useful but what I find most interesting is that the project is unrelated to any of the existing GlassFish developer or user groups. This is another indicator of real adoption; I hope we will see many more projects like this.

Check out the FreshMeat announcement, the SourceForge Website, and the Download Page. And, if you try it, please let us know of your experience with it.

Wednesday Aug 29, 2007

How to Configure Log4J with GlassFish

Log4J Logo

Andreas has been trying to use Log4J with GlassFish; he had some issues initially but finally got it working. I expect we will capture the details in the FAQ that Gail will get started very soon, but, in the meantime, check out Andreas' writeup.

Note there is a different issue on whether Log4J is a better than the bundled Java Logging API (JSR-47); for example see the comments to Andreas' previous entry. My attitude on this one is that, if some people want to use Log4J, we should document how to use it.

Tuesday Apr 24, 2007

Improved Debugging in GlassFish -- Thread Dumps and Logging

Liebherr T282 Dump Truck

We are racing towards GlassFish v2 with the usual fine-tunings on performance and bug fixes, but also with usability improvements, as shown by these writeups by Byron:

•  The new model for getting Thread Dumps: it is automatic, works in native and non-native modes and with all 3 kinds of servers -- Domain Administration Servers, Node Agents and Server Instances.

•  How to use -verbose to easily get Logging Reporting in GlassFish.

Tuesday Sep 26, 2006

Using Log4J (and others) as the Logger in TopLink Essentials

A Marine Log

More Logging...

Wonseok has a followup to his earlier blog where he showed how to Configure a Logger Type in TopLink Essentials. Wonseok proposed a new feature based on that blog, which was discussed by the Development team (including Oracle and Sun) at the (e.g. thread). The result allows customization of the logger, including, for example, log4j.

Check Wonseok's blog for details. And please consider posting back your specialized logger, if you need to write a new one.

Monday Sep 11, 2006

Logging Galore -- Phobos, TopLink Essentials, Java SE....

Logbook from Grand Turk

Logs (and printf()s) are very useful; here are 3 related blogs on this area. The first two show logging for TopLink Essentials (TLE). Adam talks about doing Simple JavaPersistence / SQL monitoring using the machinery included in GlassFish instead of using a JDBC driver like p6spy. Then Wonseok explains how to use the Java Logger when using TLE with Java SE.

Meanwhile, Phobos now has an all-JavaScript logging mechanism like Jakarta Logging. Check Roberto's blog; you will need to rebuild Phobos, this is not included in the current binary build.