Hi,

mvn test -Dopenjpa.loglevel=WARN

Thanks for that, Patrick. When I use this, two things happen, as below. Using "-Dopenjpa.Log=openjpa ( DefaultLevel=WARN )" turns off the INFO logging messages from the [resources:resources] part of the maven task. Apparently this isn't affected by the openjpa.loglevel setting, but it thinks loglevel might be intended as Log. And using - Dopenjpa.loglevel=WARN turns off messages from the test part of the maven task.

Running mvn "-Dopenjpa.Log=openjpa ( DefaultLevel=WARN )" - Dopenjpa.loglevel=WARN install seems to work to set the level in the two different maven tasks, although I'm confused why there are two different properties used to control the log messages.

Any ideas?

Craig

1. [d-mpk17-107-87:openjpa/trunk/openjpa-persistence-jdbc] clr% mvn - Dopenjpa.loglevel=WARN install[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ ----
[INFO] Building OpenJPA JPA JDBC
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------ ----
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING]
Artifact commons-collections:commons-collections:jar: 3.2:test retains local scope 'test' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope.

[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
135 WARN [main] openjpa.Runtime - The property named "openjpa.loglevel" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Log". 4260 INFO [main] openjpa.Tool - Enhancer running on type "class org.apache.openjpa.persistence.datacache.TestDataCacheOptimisticLockReco very". 5120 INFO [main] openjpa.MetaData - Found 0 classes with metadata in 6 milliseconds. 5565 INFO [main] openjpa.MetaData - Parsing class "org.apache.openjpa.persistence.datacache.TestDataCacheOptimisticLockRec overy". 5683 WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.datacache.TestDataCacheOptimisticLockReco very" has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.datacache.TestDataCacheOptimisticLockReco very" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.datacache.TestDataCacheOptimisticLockReco very". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information.

... [snipped hundreds of similar INFO logging messages]

[INFO] Executed tasks
[INFO] [surefire:test]
[INFO] Surefire report directory: /Users/clr/openjpa/openjpa/trunk/ openjpa-persistence-jdbc/target/surefire-reports

2. As I wanted, the tests reported their success/failure without the annoying INFO messages.

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.openjpa.conf.TestAutoDetachProperty
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.708 sec
Running org.apache.openjpa.persistence.query.TestResultSetMapping
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.284 sec
Running org.apache.openjpa.conf.TestBadAutoDetachProperty
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.371 sec Running org.apache.openjpa.persistence.inheritance.TestMultipleMappedSuperclassH ierarchy Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.731 sec

On Feb 1, 2007, at 12:52 PM, Patrick Linskey wrote:

mvn test -Dopenjpa.loglevel=WARN, I believe.

-Patrick

--
Patrick Linskey
BEA Systems, Inc.

______________________________________________________________________ _ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this
by email and then delete it.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 01, 2007 12:50 PM
To: open-jpa-dev@incubator.apache.org
Subject: INFO messages from JUnit tests in openjpa-persistence-jdbc

I get tons of output from the tests. Is there a way to change
the log level to WARNING?

RTFM reference?

Thanks,

Craig


Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/ jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!




Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to