hi,
To fix the same I need to set formatter in GFLauncher which requires
changes in pom.xml? Should I check-in the same?
I need to make following changes:
Index:
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
===================================================================
---
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
(revision 46735)
+++
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
(working copy)
@@ -40,10 +40,10 @@
package com.sun.enterprise.admin.launcher;
+import com.sun.enterprise.server.logging.UniformLogFormatter;
import com.sun.enterprise.universal.i18n.LocalStringsImpl;
-import com.sun.enterprise.universal.io.SmartFile;
-import java.io.*;
-import java.util.*;
+
+import java.io.IOException;
import java.util.logging.*;
/**
@@ -94,9 +94,9 @@
return;
}
logfileHandler = new FileHandler(logFile, true);
- logfileHandler.setFormatter(new SimpleFormatter());
+ logfileHandler.setFormatter(new UniformLogFormatter());
logfileHandler.setLevel(Level.INFO);
- logger.addHandler(logfileHandler);
+ logger.addHandler(logfileHandler);
}
catch(IOException e)
{
Index: launcher/pom.xml
===================================================================
--- launcher/pom.xml (revision 46735)Index:
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
===================================================================
---
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
(revision 46735)
+++
launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncherLogger.java
(working copy)
@@ -40,10 +40,10 @@
package com.sun.enterprise.admin.launcher;
+import com.sun.enterprise.server.logging.UniformLogFormatter;
import com.sun.enterprise.universal.i18n.LocalStringsImpl;
-import com.sun.enterprise.universal.io.SmartFile;
-import java.io.*;
-import java.util.*;
+
+import java.io.IOException;
import java.util.logging.*;
/**
@@ -94,9 +94,9 @@
return;
}
logfileHandler = new FileHandler(logFile, true);
- logfileHandler.setFormatter(new SimpleFormatter());
+ logfileHandler.setFormatter(new UniformLogFormatter());
logfileHandler.setLevel(Level.INFO);
- logger.addHandler(logfileHandler);
+ logger.addHandler(logfileHandler);
}
catch(IOException e)
{
Index: launcher/pom.xml
===================================================================
--- launcher/pom.xml (revision 46735)
+++ launcher/pom.xml (working copy)
@@ -93,5 +93,10 @@
<artifactId>glassfish</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.core</groupId>
+ <artifactId>logging</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
+++ launcher/pom.xml (working copy)
@@ -93,5 +93,10 @@
<artifactId>glassfish</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.core</groupId>
+ <artifactId>logging</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
Regards,
Naman
On Monday 09 May 2011 10:36 AM, Naman Mehta wrote:
>
> hi dies,
>
> I will look into this.. Let you know..
>
> Regards,
> Naman
>
> On Monday 09 May 2011 09:32 AM, Koper, Dies wrote:
>> Hi Byron, Naman,
>>
>> I noticed in server.log some messages (the ones logged by
>> GFLauncherLogger) have a different format:
>>
>> [#|2011-04-29T12:38:53.104+1000|INFO|glassfish3.2|org.jvnet.hk2.osgiadap
>> ter|_ThreadID=17;_ThreadName=Thread-1;|Stopping
>> com.sun.enterprise.v3.server.AppServerStartup_at_691ccf|#]
>>
>> 29/04/2011 12:38:53 PM
>> com.sun.enterprise.admin.launcher.GFLauncherLogger info
>> INFO: JVM invocation command line:
>>
>> GFLauncherLogger's messages have different separators ([#| at the
>> beginning, | between files and enclosing |#] and the date format is
>> different.
>>
>> AFAIK, this logger was introduced for cases where the logger service
>> wasn't available yet.
>> But what's the reason for using a different format?
>> Can't it use the same?
>>
>> Thanks,
>> Dies
>>
>