Java tutorial
//package com.java2s; public class Main { static String className; static String methodName; static int lineNumber; private static String createLog(String log) { StringBuffer buffer = new StringBuffer(); buffer.append(methodName); buffer.append("(").append(className).append(":").append(lineNumber).append(")"); buffer.append(log); return buffer.toString(); } }