Here you can find the source of log(String message, PrintStream out)
public static void log(String message, PrintStream out)
//package com.java2s; /**//from ww w. jav a 2 s . c om * Copyright (c) 2014-2015 by Wen Yu. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Any modifications to this file must keep this entire header intact. */ import java.io.PrintStream; public class Main { public static void log(String message, PrintStream out) { StackTraceElement se = Thread.currentThread().getStackTrace()[2]; out.println("; " + message + " - [" + se.getClassName() + "." + se.getMethodName() + "(): line " + se.getLineNumber() + "]"); } public static String getClassName(Class<?> c) { String name = c.getName().replace('$', '.'); if (c.isArray()) { switch (name.charAt(1)) { case 'B': name = "byte"; break; case 'C': name = "char"; break; case 'D': name = "double"; break; case 'F': name = "float"; break; case 'I': name = "int"; break; case 'J': name = "long"; break; case 'L': name = name.substring(2, name.length() - 1); break; case 'S': name = "short"; break; case 'Z': name = "boolean"; break; } name = name + "[]"; } return name; } }