Java Log Message LogMsg(String s)

Here you can find the source of LogMsg(String s)

Description

Log Msg

License

BSD License

Declaration

public static void LogMsg(String s) 

Method Source Code

//package com.java2s;
// LICENSE:       This file is distributed under the BSD license.

import java.io.BufferedWriter;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class Main {
    public static void LogMsg(String s) {
        PrintWriter out = null;//from  w  w  w.j  a  v  a 2 s  .c o m
        try {
            out = new PrintWriter(new BufferedWriter(new FileWriter(
                    "log.txt", true)));
            out.println(s);
        } catch (IOException e) {
        } finally {
            if (out != null) {
                out.close();
            }
        }
    }
}

Related

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