Hello, I have currently some troubles with logging in junit tests. In general, I have the following questions:
-) According to the manuals, I could basically use any log framework which logs to System.out and System.err, respectively (e.g., log4j). However, for having a fine grained selection mechanism in the admin console, the use of java.util.logging (JUL) is required. Is this true, since the log levels of the admin console remind me rather to those of log4j than those of JUL. -) JUL logging works quite fine for running the web application on jetty. However, when doing junit tests, JUL does not automatically read the logging.properties from the file system resulting in logging INFO and above. I have learned that the logging.properties file can be set using the - Djava.util.logging.config.file jvm argument. However, doing this for every junit test is a little bit cumbersome. (i.e., not an option). Some websites state that setting a system property (java.util.logging.config.file) in the base test class may work - but not in my case. JUL would allow to read a logging.properties file from the filesystem using the LogManager class. However, the LogManager is a restricted class on GAE (also in the dev environment). I also thought about the option of using SLF4J with the JUL binding for the web application and SLF4J with a log4j binding for JUnit tests... but I am not sure if this works out.... I would be happy to hear from others how they manage logging (especially in JUnit tests) or any suggestions that might help... -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
