Java Log Message logMsg(String msg)

Here you can find the source of logMsg(String msg)

Description

log Msg

License

Apache License

Declaration

public static void logMsg(String msg) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    private static PrintWriter out;

    public static void logMsg(String msg) {
        try {/*from   ww  w  .j a v  a  2s  . c  om*/
            if (out == null)
                init();
        } catch (Exception e) {
            e.printStackTrace();
        }

        out.println(msg);
        out.flush();
        System.out.println(msg);
    }

    public static void init() throws Exception {
        File file = new File("/tmp/benchlog-storm.txt");
        out = new PrintWriter(file);
    }
}

Related

  1. log(String msg)
  2. LOG(String msg, PrintWriter writer)
  3. logLine(String filePath, String line)
  4. logMessage(String message)
  5. LogMsg(PrintStream logger, String msg)
  6. LogMsg(String s)
  7. logRawToConsole(String msg)
  8. logString(String logtext)
  9. logThis(String id)