Reputation: 20197
The AppEngine web console allows filtering of different log levels:
AppEngine uses java.utils.logging (JUL) but JUL defines different log-levels to those used in the web console, namely:
In code this means that logging at INFO or WARING works well. LOG.info("some info message); LOG.warning("some warn message");
NB I have /logging.properties with
# Set the default logging level for all loggers
.level = ALL
But no log shows: from
LOG.fine("some fine message);
LOG.finer("some finer message);
LOG.finest("some finest message);
What code do I write to get logs to appear at DEBUG in the web console?
Upvotes: 2
Views: 145
Reputation: 117569
Upvotes: 1
Reputation: 1230
There are two ways:
To add the following to your code:
import java.util.logging.Level;
.
.
.
LOG.setLevel(Level.ALL);
LOG.warning("Warning message logged");
LOG.severe("severe debug message logged");
LOG.info("info message logged");
LOG.config("config message logged");
LOG.fine("some fine message");
LOG.finer("some finer message");
LOG.finest("some finest message");
The second option is to add your logging.properties file to appengine-web.xml as suggested here:
<!-- Configure java.util.logging --> <system-properties> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> </system-properties>
Note it should be located under WEB-INF or change that location in the previous file.
Upvotes: 0