Skip to main content

Home/ Google AppEngine/ Group items tagged logging

Rss Feed Group items tagged

Esfand S

Logging Google App Engine application? - Stack Overflow - 0 views

  • Google App Engine applications written in Java can write information to the log files using java.util.logging.Logger. Log data for an application can be viewed and analyzed using the Administration Console, or downloaded using appcfg.sh request_logs. More info in the Logging documentation.
Esfand S

Log4j in production GAE - Google App Engine for Java | Google Groups - 0 views

  • I use slf4j! use slf4j-log4j when development! use slf4j-jdk log when GAE Server!(change slf4j-log4j to slf4j-jdk-log before GAE appcfg update war)
Esfand S

1.3.8 Console Logging Issue - Google App Engine for Java | Google Groups - 0 views

  • We're going to fix this for the App Engine 1.4.0 release. What we'll do is have messages at Log.INFO level be outputted when you've got your Launch Configuration's log level set to INFO. In the Google Plugin for Eclipse, we'll make a change such that any new launch configurations created have a default log level of WARN.
Esfand S

Works fine on App Engine locally but get (session-related?) error after deploying to pr... - 0 views

  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
  • We had a GaeFlashCache built specifically for appengine. Try doing: bind(FlashCache.class).to(GaeFlashCache.class).in(Singleton.class);
Esfand S

Google App Engine for Java Questions - Google App Engine - Google Code - 0 views

  • How do I handle multipart form data? or How do I handle file uploads to my app? You can obtain the uploaded file data from a multipart form post using classes from the Apache Commons FileUpload package. Specifically you may want to use FileItemStream, FileItermIterator and ServletFileUpload as illustrated below. If you see a java.lang.NoClassDefFoundError after starting your application, make sure that the Apache Commons FileUpload JAR file has been copied to your war/WEB-INF/lib directory and added to your build path. import org.apache.commons.fileupload.FileItemStream;import org.apache.commons.fileupload.FileItemIterator;import org.apache.commons.fileupload.servlet.ServletFileUpload;import java.io.InputStream;import java.io.IOException;import java.util.logging.Logger;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class FileUpload extends HttpServlet {  private static final Logger log =      Logger.getLogger(FileUpload.class.getName());  public void doPost(HttpServletRequest req, HttpServletResponse res)      throws ServletException, IOException {    try {      ServletFileUpload upload = new ServletFileUpload();      res.setContentType("text/plain");      FileItemIterator iterator = upload.getItemIterator(req);      while (iterator.hasNext()) {        FileItemStream item = iterator.next();        InputStream stream = item.openStream();        if (item.isFormField()) {          log.warning("Got a form field: " + item.getFieldName());        } else {          log.warning("Got an uploaded file: " + item.getFieldName() +                      ", name = " + item.getName());          // You now have the filename (item.getName() and the          // contents (which you can read from stream).  Here we just          // print them back out to the servlet output stream, but you          // will probably want to do something more interesting (for          // example, wrap them in a Blob and commit them to the          // datastore).          int len;          byte[] buffer = new
Esfand S

Works fine on App Engine locally but get (session-related?) error after deploying to pr... - 0 views

  • the necessary changes to appengine-web.xml to get Sitebricks to run in development mode:         <sessions-enabled>true</sessions-enabled>         <system-properties>                 <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>                 <property name="mvel2.disable.jit" value="true"/>         </system-properties>
Esfand S

Google App Engine in Maven + IntelliJ « Nelz's Blog - 0 views

  • build-time substitution. Here’s our appengine-web.xml: <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>${gae.app.name}</application> <version>${friendlyversion}</version> <system-properties> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> </system-properties> </appengine-web-app>
  • At build time, I use the AntRun plugin (lines 97-118) to create a small file under the target directory that holds a ‘sanitized’ version of the standard Maven version. (I.e. “1.0-SNAPSHOT” becomes GAE-friendly “1-0-snapshot”.) I then use the Maven filter functionality available in the WAR plugin (lines 80-96) to copy the appengine-web.xml into its proper directory with the version substituted in.
Esfand S

Java App Engine Get Auto Generated Key value - Stack Overflow - 0 views

  • I have an Entity with an id type of Long, and the id gets filled in after I call makePersistent(). Here is what the code looks like:     GameEntity game = new GameEntity();    log.warning("before makePersistent id is " + game.getId());    pm.makePersistent(game);    log.warning("after makePersistent id is " + game.getId()); Here is a snippet of the GameEntity class: @PersistenceCapable(identityType = IdentityType.APPLICATION)public class GameEntity {    @PrimaryKey    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)    private Long id; And the output shows what you'd expect: WARNING 6428 - before makePersistent id is nullWARNING 6444 - after makePersistent id is 6 UPDATE: It occurred to me belatedly that you might want an actual Key object. You can create that yourself if you have the id: public Key getKey() {    return KeyFactory.createKey(GameEntity.class.getSimpleName(), id);}
Esfand S

Multi-domain deployment of Google App Engine (GAE) apps - Stack Overflow - 0 views

  • You have three options at the moment, when it comes to a 'multi-tenant' app such as you describe: You can have a single app that your customers add to their domains. Your app will have a single datastore, but you can use the Host header to determine which customer is accessing the app, and segregate the datastore entries based on that. Easy to deploy and upgrade Easy for customers to install Users have to have Google accounts, not Apps accounts, to log in. You can deploy a fresh app instance for each customer. Harder to deploy and upgrade More customer involvement required to install Provides firm separation of data Users can log in with their Apps credentials You can work with Google to create a new Apps Marketplace app All the benefits of point 1 and 2, above Requires Google involvement No certain release date yet
Esfand S

Using the Google Plugin for Eclipse - Google App Engine - Google Code - 0 views

  • The war/ directory uses the WAR standard layout for bundling web applications. (WAR archive files are not yet supported by the SDK.) The Eclipse plugin uses this directory for running the development server, and for deploying the app to App Engine. When Eclipse builds your project, it creates a directory named classes/ in war/WEB-INF/, and puts compiled class files here. Eclipse also copies non-source files found in src/ to war/WEB-INF/classes/, including META-INF/ and the log4j.properties and logging.properties files. The final contents of the war/ directory make up your application for testing and deployment. For details about the new project that the plugin creates, see the Getting Started Guide.
Esfand S

App Engine Fan: Are You The Key Master ? - 0 views

  • I figure it is going to take me at least four iterations to get this right. The first one will be building a GWT application with a simple UI that has no server logic behind it (just to learn how layout in GWT works). Step two will be adding a fake servlet backend (not app engine, just in memory). While not exactly App Engine yet, I should have a completely specified client-server API by the end of this process that I can subsequently implement on App Engine (iteration 3). Iteration four will handle deployment, CSS and whatever I may screw up in iterations one and two. I will log my notes of things I run into while I code.
  •  
    this is the para 1this is the second para
1 - 20 of 29 Next ›
Showing 20 items per page