1

So I've tried configuring AppEngine logging according to this guide, ensuring I've configured the logging.properties file to be used in web.xml. I've configured logging.properties the following way:

.level = WARNING
nilsnett.chinese.backend.level = INFO 

The package name of my logging wrapper is nilsnett.chinese.backend. The problem is that even with this configuration, info-level log output from my app is filtered. Evidence:

enter image description here

I've also tried the following config, which yielded the same result (including the logger class name at the end of the package name):

.level = WARNING
nilsnett.chinese.backend.JavaUtilLogger.level = INFO

To demonstrate that the logging.properties-file is actually read, and that I actually do write info-level logging data to app-engine in this service call, let me show you what happens when I set.level=INFO:

enter image description here

So my desired result is to have INFO and higher-level log outputs from my packages, while other packages, like org.datanucleus, only shows output if WARNING or more severe. In the example above, I want only the two lines marked with the purple star. Am I doing anything wrong?

4
  • have you tried to add a logger: org.level = WARNING ? Jun 26, 2013 at 9:40
  • I tried now: Same result as the image with the purple stars. Note: I still have .level=INFO on the line above in the config.
    – Nilzor
    Jun 26, 2013 at 9:46
  • you have INFO ? but in your question you wrote you set it to WARNING ? Jun 26, 2013 at 9:50
  • I wrote that I set it to ".level=INFO" in the third example (the one with the stars)
    – Nilzor
    Jun 26, 2013 at 10:44

1 Answer 1

1

change your config to:

.level = WARNING

# Set the default logging level for the datanucleus loggers
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

# FinalizableReferenceQueue tries to spin up a thread and fails.  This
# is inconsequential, so don't scare the user.
com.google.common.base.FinalizableReferenceQueue.level=WARNING
com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.level=WARNING

this is are coming from logging config template, so to set datanucleus to warning you have todo like in this template.
https://developers.google.com/appengine/docs/java/#Logging

and then just add your own logging config:

nilsnett.chinese.backend.level = INFO 

this should solve it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.