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 7994085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:02:31+00:00 2026-06-04T14:02:31+00:00

I am working on a project that uses GAE as the backend for a

  • 0

I am working on a project that uses GAE as the backend for a mobile app. We want to have really good logging implemented in the project. I have spent a lot of time reading about log4j, logback-classic, logback-access, java.util.logging (JUL) and slf4j.

My conclusion is that I want to use logback-access since it has some nice features when it comes to logging http related stuff (e.g. logging full-request-data upon errors etc.).

Since GAE only supports the log levels for JUL and logback-access does not support slf4j, I thought that I should just install logback-access and make sure it writes all logs through JUL to GAE.

Is this possible? Has anyone done this and can guide me when it comes to the configuration files for logback-access and JUL? Can logback-access communicate directly through JUL, whithout me having to add a custom Appender (I am thinking about the connection to ch.qos.logback.access.jetty.RequestLogImpl that can be added to the configuration according to the docs)? Or does the logback-access configuration for Jetty not apply for GAE? Have I gotten something wrong?

Any tips are welcome!

  • 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-04T14:02:32+00:00Added an answer on June 4, 2026 at 2:02 pm

    We did that and stayed with logback for two years. The short story is that you will end up mixing JUL and logback settings, since your application will be using logback and Google classes will be using JUL directly (and you cannot redirect JUL into logback in GAE).

    After two years we switched to a slf4j + JUL configuration, it’s easier and a single point of configuration. It is not easy, though (warning: tons of code follow):

    logging.properties:

    .level = INFO
    handlers = com.acme.log.InfoHandler,com.acme.log.ErrorHandler
    
    # these should work, but they don't. See 
    # http://code.google.com/p/googleappengine/issues/detail?id=7467
    com.acme.log.InfoHandler.level=ALL
    com.acme.log.ErrorHandler.level=WARNING
    
    # Example of log level setup for a single class
    # workaround http://code.google.com/p/google-guice/issues/detail?id=488
    com.google.inject.internal.util.level = WARNING
    

    InfoHandler.java:

    /**
     * Logs {@link Level#INFO} to {@link System#out}.
     * This class is inspired by {@link ConsoleHandler}
     */
    public class InfoHandler extends StreamHandler {
    
        public InfoHandler() {
            setOutputStream(System.out);
            setFilter(new MaxLevelFilter(Level.WARNING));
        }
    
        @Override
        public void publish(LogRecord record) {
            super.publish(record);  
            flush();
        }
    
        @Override
        public void close() {
            flush();
        }
    
    }
    

    ErrorHandler.java:

    public class ErrorHandler extends StreamHandler {
    
        public ErrorHandler() {
            setOutputStream(System.err);
        }
    
        @Override
        public void publish(LogRecord record) {
            super.publish(record);  
            flush();
        }
    
        @Override
        public void close() {
            flush();
        }
    
    }
    

    MaxLevel.java:

    public class MaxLevelFilter implements Filter {
    
        private final Level maxLevel;
    
        public MaxLevelFilter(Level level) {
            this.maxLevel = level;
        }
    
        @Override
        public boolean isLoggable(LogRecord record) {
            return maxLevel.intValue() > record.getLevel().intValue();
        }
    
    }
    

    You should also apply the workaround explained here at some application listener when the server starts.

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

Sidebar

Related Questions

I'm working on a project that uses MOSS 2007. We have user profiles set
I'm working on a project that uses OpenGL 4.0 shaders. I have to supply
I'm working on a project that uses a Windows Mobile device to call a
I am working on a project that uses VFW. I have done Google searches
I'm working on some project that uses Dojo dijit.form.Select , that produce some really
I just started working on a project that uses Entity Framework. Prevoiusly, the app
I am working on a project that uses a touch-screen interface. I have a
So recently I have been working on phonebook project that uses Binary Search Tree.
I am working on a large project that uses the STL and have a
I'm working on a project that uses different log frameworks, for example: log4j, commons-logging

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.