4

logging.propertiesJava AppEngineプロジェクトに(を使用してjava.util.logging)次のようなファイルがあります。

# Set the default logging level for all loggers to WARNING
.level = INFO

# tighten logging on the DataNucleus Categories
DataNucleus.JDO.level=WARN 
# - All messages general to JDO
DataNucleus.JPA.level=WARN 
#  - All messages general to JPA
DataNucleus.Persistence.level=WARN 
#  - All messages relating to the persistence process
DataNucleus.Query.level=WARN 
#  - All messages relating to queries
DataNucleus.Lifecycle.level=WARN 
#  - All messages relating to object lifecycle changes
DataNucleus.Cache.level=WARN 
#  - All messages relating to the DataNucleus Cache
DataNucleus.ClassLoading.level=WARN 
#  - All exceptions relating to class loading issues
DataNucleus.MetaData.level=WARN 
#  - All messages relating to MetaData
DataNucleus.Management.level=WARN 
#  - All messages relating to Management
DataNucleus.General.level=WARN 
#  - All general operational messages
DataNucleus.Connection.level=WARN 
#  - All messages relating to Connections.
DataNucleus.JCA.level=WARN 
#  - All messages relating to Connector JCA.
DataNucleus.Transaction.level=WARN 
#  - All messages relating to transactions
DataNucleus.Plugin.level=WARN 
#  - All messages relating to DataNucleus plug-ins
DataNucleus.ValueGeneration.level=WARN 
#  - All messages relating to value generation
DataNucleus.Datastore.level=WARN 
#  - All general datastore messages
DataNucleus.Datastore.Schema.level=WARN 
#  - All schema related datastore log messages
DataNucleus.Datastore.Persist.level=WARN 
#  - All datastore persistence messages
DataNucleus.Datastore.Retrieve.level=WARN 
#  - All datastore retrieval messages
DataNucleus.Datastore.Native.level=WARN 
#  - Log of all 'native' statements sent to the datastore
DataNucleus.Enhancer.level=WARN 
#  - All messages from the DataNucleus Enhancer.
DataNucleus.SchemaTool.level=WARN 
#  - All messages from DataNucleus SchemaTool
DataNucleus.IDE.level=WARN 
#  - Messages from the DataNucleus IDE.

残念ながら、次のようなログメッセージが表示されます。

2012-04-17 16:13:45.112
org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints: Bundle "org.datanucleus.jpa" has an optional dependency to "org.datanucleus.enhancer" but it cannot be resolved

I 2012-04-17 16:13:45.115    
org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints: Bundle "org.datanucleus" has an optional dependency to "org.eclipse.equinox.registry" but it cannot be resolved

I 2012-04-17 16:13:45.719
org.datanucleus.PersistenceConfiguration setProperty: Property datanucleus.rdbms.sql.allowAllSQLStatements unknown - will be ignored

I 2012-04-17 16:13:47.806
org.datanucleus.store.appengine.MetaDataValidator validate: Performing appengine-specific metadata validation for in.animeshpathak.nazdeeq.models.Note

ファイルを適切に構成する方法を教えてもらえlogging.propertiesますか?現時点でコードからのデバッグメッセージを表示するには、一般的なログレベルが必要ですが、INFOすべてのDataNucleusログレベルをに設定したいと思いWARNます。

ありがとう。

4

1 に答える 1

6

FINEST実際、コードからのデバッグメッセージを表示する場合は、レベルではなくレベルが必要ですINFO

logging.propertiesを次のように置き換えてみてください。

# Set the default logging level for all loggers to FINEST
.level=FINEST

# Set the default logging level for ORM, specifically, to WARNING
DataNucleus.JDO.level=WARNING
DataNucleus.Persistence.level=WARNING
DataNucleus.Cache.level=WARNING
DataNucleus.MetaData.level=WARNING
DataNucleus.General.level=WARNING
DataNucleus.Utility.level=WARNING
DataNucleus.Transaction.level=WARNING
DataNucleus.Datastore.level=WARNING
DataNucleus.ClassLoading.level=WARNING
DataNucleus.Plugin.level=WARNING
DataNucleus.ValueGeneration.level=WARNING
DataNucleus.Enhancer.level=WARNING
DataNucleus.SchemaTool.level=WARNING

DataNucleusの提案によると、これははるかに簡潔です。

# Set the default logging level for all loggers to FINEST
.level=FINEST

# Set the default logging level for ORM, specifically, to WARNING
DataNucleus.level=WARNING
于 2012-04-17T17:13:45.700 に答える