-
Enhancement
-
Resolution: Future Project
-
P4
-
None
-
5.0
-
x86
-
linux
A DESCRIPTION OF THE REQUEST :
There does not seem to be any way to make java.util.logging.SimpleFormatter output
the LogRecord time in milliseconds.
JUSTIFICATION :
Many applications require knowing when something happened with better than one second precision.
This functionality is so widely useful that it should be in the standard logging classes -
I should not have to find or write another class to do it.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would like to be able to generate log entries like this:
Jun 11, 2005 5:34:11.123 PM TestLogger main
INFO: testing
or this:
11/06/2005 16:35:27.123 TestLogger main
INFO: testing
ACTUAL -
I can only log this:
Jun 11, 2005 5:34:11 PM TestLogger main
INFO: testing
(no milliseconds)
or this:
11/06/2005 16:35:27 TestLogger main
INFO: testing
(again no milliseconds)
---------- BEGIN SOURCE ----------
import java.util.logging.*;
public class TestLogger
{
static public void main( String[] args )
{
Logger.global.info( "testing" );
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
write my own class that extends java.util.logging.Formatter
###@###.### 2005-06-14 09:20:44 GMT
There does not seem to be any way to make java.util.logging.SimpleFormatter output
the LogRecord time in milliseconds.
JUSTIFICATION :
Many applications require knowing when something happened with better than one second precision.
This functionality is so widely useful that it should be in the standard logging classes -
I should not have to find or write another class to do it.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would like to be able to generate log entries like this:
Jun 11, 2005 5:34:11.123 PM TestLogger main
INFO: testing
or this:
11/06/2005 16:35:27.123 TestLogger main
INFO: testing
ACTUAL -
I can only log this:
Jun 11, 2005 5:34:11 PM TestLogger main
INFO: testing
(no milliseconds)
or this:
11/06/2005 16:35:27 TestLogger main
INFO: testing
(again no milliseconds)
---------- BEGIN SOURCE ----------
import java.util.logging.*;
public class TestLogger
{
static public void main( String[] args )
{
Logger.global.info( "testing" );
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
write my own class that extends java.util.logging.Formatter
###@###.### 2005-06-14 09:20:44 GMT