Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » mysterious logging
mysterious logging [message #754293] Tue, 01 November 2011 20:58 Go to next message
Rainer is currently offline Rainer
Messages: 21
Registered: July 2009
Junior Member
Hi,

I'm testing a custom logger and found different logging information if I use the custom logger in comparison to use the standard logger.

output of standard logger
[EL Info]: 2011-11-01 11:56:36.358--ServerSession(8961198)--Thread(Thread[AWT-EventQueue-0,6,main])--EclipseLink, version: Eclipse Persistence Services - 2.3.0.v20110604-r9504
[EL Fine]: 2011-11-01 11:56:36.734--Thread(Thread[AWT-EventQueue-0,6,main])--Detected Vendor platform: org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: 2011-11-01 11:56:36.812--ServerSession(8961198)--Connection(9589196)--Thread(Thread[AWT-EventQueue-0,6,main])--connecting(DatabaseLogin(
platform=>JavaDBPlatform
user name=> "test"
datasource URL=> "jdbc:derby://localhost/Z:/Projekte.INDIGO/OCoM/orienteeringDB;create=true"
))
[EL Config]: 2011-11-01 11:56:36.828--ServerSession(8961198)--Connection(3693744)--Thread(Thread[AWT-EventQueue-0,6,main])--Connected: jdbc:derby://localhost:1527/Z:/Projekte.INDIGO/OCoM/orienteeringDB;create=true
User: test
Database: Apache Derby Version: 10.8.1.2 - (1095077)
Driver: Apache Derby Network Client JDBC Driver Version: 10.8.1.2 - (1095077)

output of custom logger
21:55:48,255 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 topLink_version
21:55:48,663 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 dbPlatformHelper_detectedVendorPlatform
21:55:48,709 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 connecting
21:55:48,725 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 connected_user_database_driver
21:55:48,913 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 login_successful
21:55:48,991 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 CREATE TABLE CLUBS (NAME VARCHAR(255) NOT NULL, CITY VARCHAR(255), COUNTRY VARCHAR(255), FKCONTACT INTEGER, REGION VARCHAR(255), PRIMARY KEY (NAME))
21:55:49,178 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24 VALUES(1)
21:55:49,225 MEZ AWT-EventQueue-0 CustomSessionLog INFO CustomSessionLog.java:log:24

The logging level is both time the same.(FINE)

I've expected the same output for both cases. What's wrong, my thinking or EclipseLink. Can anybody explain me.

Rainer
Re: mysterious logging [message #754443 is a reply to message #754293] Wed, 02 November 2011 14:39 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1023
Registered: July 2009
Senior Member
If you look at the DefaultSessionLog and JavaLog classes which extend AbstractSessionLog, you will see that their implementations of the log method make a call to AbstractSessionLog's formateMessage. This method handles converting and translating the EclipseLink messages into the appropriate localization and adding in parameters from the SessionLogEntry, which seems to be missing in your log output.

Best Regards,
Chris
Re: mysterious logging [message #754444 is a reply to message #754293] Wed, 02 November 2011 14:39 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1023
Registered: July 2009
Senior Member
If you look at the DefaultSessionLog and JavaLog classes which extend AbstractSessionLog, you will see that their implementations of the log method make a call to AbstractSessionLog's formateMessage. This method handles converting and translating the EclipseLink messages into the appropriate localization and adding in parameters from the SessionLogEntry, which seems to be missing in your log output.

Best Regards,
Chris
icon14.gif  Re: mysterious logging [message #754480 is a reply to message #754444] Wed, 02 November 2011 17:11 Go to previous messageGo to next message
Rainer H. is currently offline Rainer H.
Messages: 15
Registered: July 2009
Junior Member
Yeah, thanks that's it. Surprised
Re: mysterious logging [message #754481 is a reply to message #754443] Wed, 02 November 2011 17:12 Go to previous messageGo to next message
Rainer is currently offline Rainer
Messages: 21
Registered: July 2009
Junior Member
Yeah, thanks that's it. :o
Re: mysterious logging [message #755229 is a reply to message #754293] Mon, 07 November 2011 18:18 Go to previous message
James is currently offline James
Messages: 272
Registered: July 2009
Senior Member
The string being logged by your custom logger are the message ids. It seems your custom logger is not translating them.

Refer to the default logger for the correct code on how to do this.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/
Previous Topic:mysterious logging
Next Topic:Custom sequence
Goto Forum:
  


Current Time: Sat Sep 20 03:57:52 GMT 2014

Powered by FUDForum. Page generated in 0.02311 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software