Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import android.util.Log; public class Main { public static void logit(String message) { String prefLabel = new Throwable().getStackTrace()[1].toString(); Log.v("logit", prefLabel + ": " + message); } }