Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    public static final boolean ENABLE_LOG = true;
    public static final String TAG_INSTAGRAM = "Instagram";

    /**
     * Method for showing Log messages.
     *
     * @param message
     */
    public static void showLog(String tag, Object message) {

        if (ENABLE_LOG) {
            if (tag == null || tag.isEmpty()) {
                Log.d(TAG_INSTAGRAM, String.valueOf(message));
            } else {
                Log.d(tag, String.valueOf(message));
            }
        }

    }

    /**
     * Method for showing Log messages.
     *
     * @param message
     */
    public static void showLog(String message) {

        showLog(TAG_INSTAGRAM, message);

    }

    /**
     * Method for showing Log messages.
     *
     * @param message
     */
    public static void showLog(Object message) {

        showLog(TAG_INSTAGRAM, String.valueOf(message));

    }
}