Tabnine Logo
Platform.log
Code IndexAdd Tabnine to your IDE (free)

How to use
log
method
in
playn.core.Platform

Best Java code snippets using playn.core.Platform.log (Showing top 20 results out of 315)

origin: threerings/playn

/**
 * Returns the {@link Log} service.
 */
public static Log log() {
 return platform.log();
}
origin: threerings/tripleplay

protected void execute (Platform plat, Runnable runnable) {
  try {
    runnable.run();
  } catch (Exception e) {
    plat.log().warn("Action failed", e);
  }
}
origin: playn/playn

@Override
public void drawString(float x, float y, String s, Color3f color) {
 plat.log().info("drawString not yet implemented in DebugDrawBox2D: " + s);
}
origin: threerings/tripleplay

  protected Log log () { return game().plat.log(); }
}
origin: threerings/tripleplay

  public void log (Level level, String ident, String message, Throwable t) {
    String msg = ident + ": " + message;
    switch (level) {
    case DEBUG:
      if (t != null) plat.log().debug(msg, t);
      else plat.log().debug(msg);
      break;
    default:
    case INFO:
      if (t != null) plat.log().info(msg, t);
      else plat.log().info(msg);
      break;
    case WARNING:
      if (t != null) plat.log().warn(msg, t);
      else plat.log().warn(msg);
      break;
    case ERROR:
      if (t != null) plat.log().error(msg, t);
      else plat.log().error(msg);
      break;
    }
  }
}
origin: threerings/tripleplay

protected void takeFocus (ActiveScreen as) {
  try {
    as.screen.lostFocus();
  } catch (Exception e) {
    _game.plat.log().warn("Screen choked in lostFocus() [screen=" + as.screen + "]", e);
  }
}
origin: io.playn/playn-core

/**
 * Informs the graphics system that the main framebuffer size has changed. The supplied size
 * should be in physical pixels.
 */
protected void viewportChanged (int pixelWidth, int pixelHeight) {
 viewPixelWidth = pixelWidth;
 viewPixelHeight = pixelHeight;
 viewSizeM.width = scale.invScaled(pixelWidth);
 viewSizeM.height = scale.invScaled(pixelHeight);
 plat.log().info("viewPortChanged " + pixelWidth + "x" + pixelHeight + " / " + scale.factor +
         " -> " + viewSize);
}
origin: playn/playn

/**
 * Called when a backend (or other framework code) encounters an exception that it can recover
 * from, but which it would like to report in some orderly fashion. <em>NOTE:</em> this method
 * may be called from threads other than the main PlayN thread.
 */
public void reportError (String message, Throwable cause) {
 errors.emit(new Error(message, cause));
 log().warn(message, cause);
}
origin: io.playn/playn-core

/**
 * Called when a backend (or other framework code) encounters an exception that it can recover
 * from, but which it would like to report in some orderly fashion. <em>NOTE:</em> this method
 * may be called from threads other than the main PlayN thread.
 */
public void reportError (String message, Throwable cause) {
 errors.emit(new Error(message, cause));
 log().warn(message, cause);
}
origin: playn/playn

/**
 * Informs the graphics system that the main framebuffer size has changed. The supplied size
 * should be in physical pixels.
 */
protected void viewportChanged (int pixelWidth, int pixelHeight) {
 viewPixelWidth = pixelWidth;
 viewPixelHeight = pixelHeight;
 viewSizeM.width = scale.invScaled(pixelWidth);
 viewSizeM.height = scale.invScaled(pixelHeight);
 plat.log().info("viewPortChanged " + pixelWidth + "x" + pixelHeight + " / " + scale.factor +
         " -> " + viewSize);
}
origin: threerings/tripleplay

@Override public void wasShown () {
  super.wasShown();
  game().plat.log().info(this + ".wasShown()");
}
origin: threerings/tripleplay

@Override public void showTransitionCompleted () {
  super.showTransitionCompleted();
  game().plat.log().info(this + ".showTransitionCompleted()");
}
origin: threerings/tripleplay

@Override public void hideTransitionStarted () {
  super.hideTransitionStarted();
  game().plat.log().info(this + ".hideTransitionStarted()");
}
origin: threerings/tripleplay

@Override public void wasHidden () {
  super.wasHidden();
  game().plat.log().info(this + ".wasHidden()");
}
origin: threerings/tripleplay

@Override public void wasRemoved () {
  super.wasRemoved();
  game().plat.log().info(this + ".wasRemoved()");
  iface.disposeRoots();
  layer.close();
}
origin: threerings/tripleplay

protected void giveFocus (ActiveScreen as) {
  try {
    _current = as;
    as.screen.gainedFocus();
    // if we have a previous screen, and the direction supports manual untransitioning,
    // set up a listener to handle that
    ActiveScreen previous = (_screens.size() <= 1) ? null : _screens.get(1);
    _onPointer.close();
    if (previous == null || !as.dir.canUntrans()) _onPointer = Closeable.Util.NOOP;
    else _onPointer = as.screen.layer.events().connect(new UntransListener(as, previous));
  } catch (Exception e) {
    _game.plat.log().warn("Screen choked in gainedFocus() [screen=" + as.screen + "]", e);
  }
  checkSleep();
}
origin: playn/playn

@Override protected void upload (Graphics gfx, Texture tex) {
 int width = pixelWidth, height = pixelHeight;
 if (width == 0 || height == 0) {
  ((RoboGraphics)gfx).plat.log().info("Ignoring texture update for empty image (" +
                    width + "x" + height + ").");
  return;
 }
 CGBitmapContext bctx = RoboGraphics.createCGBitmap(width, height);
 CGRect rect = new CGRect(0, 0, width, height);
 bctx.clearRect(rect);
 bctx.drawImage(rect, image);
 upload(gfx, tex.id, width, height, bctx.getData());
 bctx.dispose();
}
origin: threerings/tripleplay

  public TripleDemo (Platform plat) {
    super(plat, 25); // update our "simulation" 40 times per second
    game = this;     // jam ourselves into a global variable, woo!
    new Pointer(plat, rootLayer, true);        // wire up event dispatch
    screens.push(new DemoMenuScreen(screens)); // start off with our menu screen

    // show debug rectangles when D key is pressed; dump scene graph on shift-D
    plat.input().keyboardEvents.collect(Keyboard.isKey(Key.D)).connect(event -> {
      Layer.DEBUG_RECTS = event.down;
      if (event.down && event.isShiftDown()) {
       rootLayer.debugPrint(plat.log());
      }
    });
  }
}
origin: io.playn/playn-core

else plat.log().warn("Platform has neither mouse nor touch events?", "type", plat.type());
origin: playn/playn

else plat.log().warn("Platform has neither mouse nor touch events?", "type", plat.type());
playn.corePlatformlog

Javadoc

Returns the Log service.

Popular methods of Platform

  • graphics
    Returns the Graphics service.
  • assets
    Returns the Assets service.
  • input
    Returns the Input service.
  • invokeLater
  • exec
    Returns the Exec service.
  • json
    Returns the Json service.
  • storage
    Returns the Storage storage service.
  • time
    Returns the current time, as a double value in millis since January 1, 1970, 00:00:00 GMT. This is e
  • type
    Returns the platform Platform.Type.
  • net
    Returns the Net service.
  • reportError
    Called when a backend (or other framework code) encounters an exception that it can recover from, bu
  • setPropagateEvents
  • reportError,
  • setPropagateEvents,
  • tick,
  • audio,
  • dispatchEvent,
  • keyboard,
  • mouse,
  • openURL,
  • pointer

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JTable (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now