Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the package of Log class to protected and not accessible by apps... #50

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/src/com/bumptech/glide/Glide.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.bumptech.glide.resize.ImageManager;
import com.bumptech.glide.resize.load.Downsampler;
import com.bumptech.glide.resize.load.Transformation;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;
import com.bumptech.glide.volley.VolleyUrlLoader;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
package com.bumptech.glide.util;
package com.bumptech.glide;

import android.annotation.SuppressLint;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Log {
public static boolean DEBUG = false;
protected class Log {
protected static boolean DEBUG = false;

private static final String TAG = "GLIDE";

@SuppressLint("SimpleDateFormat")
private static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

public static void e(String message, Object... args) {
protected static void e(String message, Object... args) {
String formatted = args.length > 0 ? String.format(message, args) : message;
android.util.Log.e(TAG, formatted);
}

public static void e(String message, Throwable t, Object... args){
protected static void e(String message, Throwable t, Object... args){
String formatted = args.length > 0 ? String.format(message, args) : message;
android.util.Log.e(TAG, formatted, t);
}

public static void w(String message, Object... args) {
protected static void w(String message, Object... args) {
String formatted = args.length > 0 ? String.format(message, args) : message;
android.util.Log.w(TAG, formatted);
}

public static void i(String message, Object... args) {
protected static void i(String message, Object... args) {
if (!DEBUG) return;

String formatted = args.length > 0 ? String.format(message, args) : message;
android.util.Log.i(TAG, formatted);
}

public static void d(String message, Object... args) {
protected static void d(String message, Object... args) {
if (!DEBUG) return;

String formatted = args.length > 0 ? String.format(message, args) : message;
formatted = "[" + dateFormat.format(new Date()) + "] " + formatted;
android.util.Log.d(TAG, formatted);
}

public static void v(String message, Object... args) {
protected static void v(String message, Object... args) {
if (!DEBUG) return;

String formatted = args.length > 0 ? String.format(message, args) : message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.bumptech.glide.presenter.target.ImageViewTarget;
import com.bumptech.glide.presenter.target.Target;
import com.bumptech.glide.resize.load.Transformation;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;

/**
* Wraps an {@link Target} to display arbitrary Bitmaps and provides a framework for fetching and
Expand Down
2 changes: 1 addition & 1 deletion library/src/com/bumptech/glide/resize/ImageManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.bumptech.glide.resize.load.Downsampler;
import com.bumptech.glide.resize.load.ImageResizer;
import com.bumptech.glide.resize.load.Transformation;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.bumptech.glide.resize.bitmap_recycle;

import android.graphics.Bitmap;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import android.os.Build;
import com.bumptech.glide.resize.RecyclableBufferedInputStream;
import com.bumptech.glide.resize.bitmap_recycle.BitmapPool;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;
import java.io.IOException;
import java.util.EnumSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static com.bumptech.glide.resize.load.ImageHeaderParser.ImageType.*;

import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.bumptech.glide.resize.RecyclableBufferedInputStream;
import com.bumptech.glide.resize.bitmap_recycle.BitmapPool;
import com.bumptech.glide.resize.bitmap_recycle.BitmapPoolAdapter;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.bumptech.glide.resize.cache.DiskLruCacheWrapper;
import com.bumptech.glide.samples.flickr.api.Api;
import com.bumptech.glide.samples.flickr.api.Photo;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;
import com.bumptech.glide.volley.VolleyUrlLoader;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.bumptech.glide.util.Log;
import com.bumptech.glide.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
Expand Down