/ime/latinime/src/com/googlecode/eyesfree/inputmethod/latin/tutorial/LatinTutorialLogger.java
Java | 42 lines | 12 code | 6 blank | 24 comment | 1 complexity | 1a9266c28b7e6f1ab327a51904ca6554 MD5 | raw file
1/* 2 * Copyright (C) 2011 Google Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.googlecode.eyesfree.inputmethod.latin.tutorial; 18 19import android.util.Log; 20 21/** 22 * Handles logging formatted strings. 23 * 24 * @author alanv@google.com (Alan Viverette) 25 */ 26public class LatinTutorialLogger { 27 private static final String TAG = "LatinTutorial"; 28 29 /** 30 * The minimum log level that will be printed to the console. Set this to 31 * {@link Log#ERROR} for release or {@link Log#VERBOSE} for debugging. 32 */ 33 private static final int LOG_LEVEL = Log.ERROR; 34 35 public static void log(int priority, String format, Object... args) { 36 if (priority < LOG_LEVEL) { 37 return; 38 } 39 40 Log.println(priority, TAG, String.format(format, args)); 41 } 42}