88 */
99package com .parse ;
1010
11+ import android .annotation .SuppressLint ;
1112import android .util .Log ;
1213
1314/**
14- * Parse Logger
15+ * Parse Logger. See {@link #setLogLevel(int)}
1516 */
17+ @ SuppressWarnings ("WeakerAccess" )
1618public class PLog {
19+
20+ @ SuppressWarnings ("unused" )
1721 public static final int LOG_LEVEL_NONE = Integer .MAX_VALUE ;
1822
1923 private static int logLevel = Integer .MAX_VALUE ;
@@ -45,6 +49,7 @@ public static void setLogLevel(int logLevel) {
4549 PLog .logLevel = logLevel ;
4650 }
4751
52+ @ SuppressLint ("WrongConstant" )
4853 private static void log (int messageLogLevel , String tag , String message , Throwable tr ) {
4954 if (messageLogLevel >= logLevel ) {
5055 if (tr == null ) {
@@ -55,41 +60,35 @@ private static void log(int messageLogLevel, String tag, String message, Throwab
5560 }
5661 }
5762
58- /* package */
59- static void v (String tag , String message , Throwable tr ) {
63+ public static void v (String tag , String message , Throwable tr ) {
6064 log (Log .VERBOSE , tag , message , tr );
6165 }
6266
63- static void v (String tag , String message ) {
67+ public static void v (String tag , String message ) {
6468 v (tag , message , null );
6569 }
6670
67- /* package */
68- static void d (String tag , String message , Throwable tr ) {
71+ public static void d (String tag , String message , Throwable tr ) {
6972 log (Log .DEBUG , tag , message , tr );
7073 }
7174
72- /* package */
7375 public static void d (String tag , String message ) {
7476 d (tag , message , null );
7577 }
7678
77- /* package */
78- static void i (String tag , String message , Throwable tr ) {
79+ public static void i (String tag , String message , Throwable tr ) {
7980 log (Log .INFO , tag , message , tr );
8081 }
8182
8283 public static void i (String tag , String message ) {
8384 i (tag , message , null );
8485 }
8586
86- /* package */
87- static void w (String tag , String message , Throwable tr ) {
87+ public static void w (String tag , String message , Throwable tr ) {
8888 log (Log .WARN , tag , message , tr );
8989 }
9090
91- /* package */
92- static void w (String tag , String message ) {
91+ public static void w (String tag , String message ) {
9392 w (tag , message , null );
9493 }
9594
0 commit comments