Here you can find the source of logError(String message)
static void logError(String message)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.io.PrintStream; import java.text.SimpleDateFormat; import java.util.Date; public class Main { static final SimpleDateFormat _DateFormatter = new SimpleDateFormat("HH:mm:ss:SSS"); private static final PrintStream err = System.err; private static boolean sendConsoleOutputToTwsLog = false; static void logError(String message) { getErrStream().println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); getErrStream().println(formatMessage(message)); getErrStream().println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); }/*ww w . java 2 s .c o m*/ static PrintStream getErrStream() { if (sendConsoleOutputToTwsLog) { return System.err; } else { return err; } } private static String formatMessage(String message) { return _DateFormatter.format(new Date()) + " IBController: " + message; } }