Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324243 - DB auto detection should log matching RE not print all non-matching
Summary: DB auto detection should log matching RE not print all non-matching
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P4 trivial (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 324213
  Show dependency tree
 
Reported: 2010-09-01 16:14 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2010-09-01 16:14:41 EDT
>We are logging most of the entries in VendorNameToPlatformMapping.properties 
- we should only log the success or lack of any match in FINEST logs

>We log
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.HSQLPlatform, RegularExpression: (?i)hsql.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.InformixPlatform, RegularExpression: (?i)informix.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.PointBasePlatform, RegularExpression: (?i)pointbase.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.DB2Platform, RegularExpression: (?i).*db2.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.SQLServerPlatform, RegularExpression: (?i)microsoft.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.PostgreSQLPlatform, RegularExpression: (?i)postgresql.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.H2Platform, RegularExpression: (?i)h2.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.SybasePlatform, RegularExpression: (?i)(sybase.*)|(adaptive server enterprise.*)|(SQL Server).
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.FirebirdPlatform, RegularExpression: (?i)firebird.*.
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.JavaDBPlatform, RegularExpression: (?i).*derby.
[EL Fine]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--Detected Vendor platform: org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: 2010-09-01 16:01:57.1--ServerSession(15218962)--Connection(14372770)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
	platform=>JavaDBPlatform

>We should log
[EL Finest]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--DBPlatform: org.eclipse.persistence.platform.database.JavaDBPlatform, RegularExpression: (?i).*derby.
[EL Fine]: 2010-09-01 16:01:57.08--Thread(Thread[main,5,main])--Detected Vendor platform: org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: 2010-09-01 16:01:57.1--ServerSession(15218962)--Connection(14372770)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
	platform=>JavaDBPlatform

>Change DBPlatformHelper.matchVendorNameInProperties() from

            if(logger.shouldLog(SessionLog.FINEST)) {
                logger.log(SessionLog.FINEST, "dbPlatformHelper_regExprDbPlatform", regExpr, value); // NOI18N
            }
            if( matchPattern(regExpr, vendorName, logger) ) {
                dbPlatform = value;
            }
>to
            if( matchPattern(regExpr, vendorName, logger) ) {
                dbPlatform = value;
              if(logger.shouldLog(SessionLog.FINEST)) {
                  logger.log(SessionLog.FINEST, "dbPlatformHelper_regExprDbPlatform", regExpr, value); // NOI18N
              }
            }
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:10:45 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink