Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8418589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:22:38+00:00 2026-06-10T02:22:38+00:00

I’m trying to do some simple logging in GAE, though I think I must

  • 0

I’m trying to do some simple logging in GAE, though I think I must be missing some simple step.

I have followed the instructions here: https://developers.google.com/appengine/docs/java/runtime#Logging

I wish to write a simple message to the log, like so:

public class InsertServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;
    private static final Logger log = Logger.getLogger(InsertServlet.class.getName());

    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {

            log.info("Handled GET request - custom message");
            resp.setContentType("text/plain");
            resp.getWriter().println("HELLO");

    }

}

If I visit my app with the web browser, I can see that it is working (get the “HELLO” message in the browser).

However after this, if I visit the logs in the console, I can see that it is logging the event, but I don’t see my message anywhere.

I have selected “Show: All Requests”, but this is all I see in the logs after my visit:

012-08-19 13:34:56.488 /insert 200 2922ms 0kb Mozilla/5.0 (Windows NT
6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1

2602:306:ce97:de40:8dbd:ace7:14c3:89e2 – – [19/Aug/2012:13:34:56
-0700] “GET /insert HTTP/1.1” 200 52 – “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1”
“karwosts-helloworld.appspot.com” ms=2923 cpu_ms=1213 api_cpu_ms=0
cpm_usd=0.000006 loading_request=1
instance=00c61b117cf339fa358dc217b91a9f45b8c30f

I 2012-08-19 13:34:56.487

This request caused a new process to be started for your application,
and thus caused your application code to be loaded for the first time.
This request may thus take longer and use more CPU than a typical
request for your application.

Logging.Properties (only one line):

.level = WARNING

appengine-web.xml

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>karwosts-helloworld</application>
  <version>1</version>

  <threadsafe>true</threadsafe>

  <!-- Configure java.util.logging -->
  <system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  </system-properties>

</appengine-web-app>

Where is my custom log.info string? Am I not looking at the right place?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:22:39+00:00Added an answer on June 10, 2026 at 2:22 am

    A first glance, I would say that as you use this setup in your “logging.properties” file :

    .level = WARNING
    

    And, you (don’t specify any level when you log in your code, the default level would be used, which is certainly not ‘WARNING’ (I would guess INFO^^)
    do specify a logging level with this line :

    log.info(msg);
    
    /* which is same as */
    log.log(Level.INFO, msg);
    

    So the result is that you log only at ‘INFO’ level (in your example), but your config file says to log at WARNING level and above. As ‘info’ level is below ‘warning’, they are discarded from you log file and not shown in your server’s log.

    I suggest trying this method instead, which forces you to specify the level of logging.

    import java.util.logging.Level;
    import java.util.logging.Logger;
    /* ... */
    log.log(Level.INFO, "a info msg"); //info
    log.log(Level.WARNING, "a warning msg"); //warning
    log.log(Level.FINEST, "a fine(st) msg"); //debug (as finest)
    

    After that you can use the logging.properties file to set the levels of logging you want for the classes you want :

    # Set the default logging level for all loggers to WARNING
    .level = WARNING
    
    # Set level for your app
    oed.server.level = INFO
    oed.server.data.datastore.myInjector.level = FINEST
    

    Edit2 :
    This logging configuration has no impact when running on the client side. When you want to log message in GWT, there is this GWT.log(message);, but no level can be specified.

    It’s no entirely correct, it depends on the configuration in the your-app.gwt.xml file.
    All details can be found on google dev guilde logging. I found it very usefull and well done. Still, in a nut shell, there are various default loggers in GWT (around 5-6); all are configurable in the *.gwt.xml through their handlers (or can be done pragmatically).
    After having the invasive popup logger been there for too long … I choose to remotely log from the client to the server to enjoy the use of logging.properties, here is the config when using gwt.xml:

    <!-- Logging configuration -->
      <inherits name="com.google.gwt.logging.Logging"/>
    
      <set-property name="gwt.logging.logLevel" value="INFO"/>  <!-- # To change the default logLevel -->
      <set-property name="gwt.logging.enabled" value="TRUE"/>  
      <set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED" /> <!-- Remote logging (linked with servlet) -->
      <set-property name="gwt.logging.popupHandler" value="DISABLED" />
      <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />  
      <set-property name="gwt.logging.systemHandler" value="ENABLED" />
      <set-property name="gwt.logging.firebugHandler" value="DISABLED" />
      <set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
    

    If you use this setup, don’t forget to configure your web.xml with a servlet definition to handle the logging (it’s not provided in the documentation, sadly) :

    <servlet>
            <servlet-name>remoteLogging</servlet-name>
            <servlet-class>com.google.gwt.logging.server.RemoteLoggingServiceImpl</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>remoteLogging</servlet-name>
            <url-pattern>/your-app-name/remote_logging</url-pattern>
        </servlet-mapping>
    

    Good luck !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.