Here you can find the source of log(String msg)
public static void log(String msg)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat timestampFormat = new SimpleDateFormat( "yyyy-MM-dd HH.mm.ss.SSS"); public static String osType = System.getProperty("os.name") .toUpperCase().startsWith("Z/OS") ? "z/OS" : System .getProperty("os.name").toUpperCase().startsWith("WIN") ? "WIN" : "OTHER"; public static void log(String msg) { if (osType.equals("z/OS")) { System.out.println(timestampFormat.format(new Date()) + ":" + msg);/* www . j ava 2s .c o m*/ } else System.out.println("[" + timestampFormat.format(new Date()) + "] " + msg); } }