Android Open Source - Emoji-ChatRoom Logger






From Project

Back to project page Emoji-ChatRoom.

License

The source code is released under:

Apache License

If you think the Android project Emoji-ChatRoom listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.emojicharroom.util;
/*from w  w w .  j  a v  a 2s. c  o  m*/
import android.util.Log;

/**
 * Wrapper for logging operations which can be disabled by setting LOGGING_ENABLED.
 */
public class Logger {
  private final static boolean LOGGING_ENABLED = true;
  private final static String TAG = "Emoji";
  
  public static void d(String msg) {
    if (LOGGING_ENABLED) {
      Log.d(TAG, msg);
    }
  }
  
  public static void d(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.d(TAG, msg, t);
    }
  }
  
  public static void e(String msg) {
    if (LOGGING_ENABLED) {
      Log.e(TAG, msg);
    }
  }
  
  public static void e(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.e(TAG, msg, t);
    }
  }
  
  public static void i(String msg) {
    if (LOGGING_ENABLED) {
      Log.i(TAG, msg);
    }
  }
  
  public static void i(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.i(TAG, msg, t);
    }
  }
  
  public static void v(String msg) {
    if (LOGGING_ENABLED) {
      Log.v(TAG, msg);
    }
  }
  
  public static void v(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.v(TAG, msg, t);
    }
  }
  
  public static void w(String msg) {
    if (LOGGING_ENABLED) {
      Log.w(TAG, msg);
    }
  }
  
  public static void w(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.w(TAG, msg, t);
    }
  }

}




Java Source Code List

com.emojicharroom.util.Config.java
com.emojicharroom.util.DatabaseHelper.java
com.emojicharroom.util.EmojiFreq.java
com.emojicharroom.util.Logger.java
com.emojicharroom.util.MySocket.java
com.emojicharroom.util.package-info.java
com.emojichatroom.ChatRoom.java
com.emojichatroom.NetworkConsole.java