package com.sun.enterprise.glassfish.logging; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.LogRecord; import java.util.concurrent.ArrayBlockingQueue; public class GFTmpHandler extends Handler{ private static int MAX_MESSAGES = 100; private static ArrayBlockingQueue earlyMessages = new ArrayBlockingQueue(MAX_MESSAGES); // collect the message that are logged before the log service is started // The log manager service will print them out when it is started. public void publish (LogRecord record) { //log manager service not started yet so we are queuing up the messages try { earlyMessages.add(record); } catch (IllegalStateException ie) { // can't add more messages; something terrible is happening. // Dump the queue to a file, need to stop queuing messages } } /** * Called to close this log handler. */ public void close() { } /** * Called to flush any cached data that * this log handler may contain. */ public void flush() { // not used } }