/ime/latinime/src/com/googlecode/eyesfree/inputmethod/latin/tutorial/LatinTutorialLogger.java

http://eyes-free.googlecode.com/ · 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. package com.googlecode.eyesfree.inputmethod.latin.tutorial;
  17. import android.util.Log;
  18. /**
  19. * Handles logging formatted strings.
  20. *
  21. * @author alanv@google.com (Alan Viverette)
  22. */
  23. public class LatinTutorialLogger {
  24. private static final String TAG = "LatinTutorial";
  25. /**
  26. * The minimum log level that will be printed to the console. Set this to
  27. * {@link Log#ERROR} for release or {@link Log#VERBOSE} for debugging.
  28. */
  29. private static final int LOG_LEVEL = Log.ERROR;
  30. public static void log(int priority, String format, Object... args) {
  31. if (priority < LOG_LEVEL) {
  32. return;
  33. }
  34. Log.println(priority, TAG, String.format(format, args));
  35. }
  36. }