Java Log to File log(String message)

Here you can find the source of log(String message)

Description

log

License

Open Source License

Declaration

public static void log(String message) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static void log(String message) {
        Date date = new Date();
        DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
        String reportDate = df.format(date);
        System.out.println(reportDate + "\t" + message);
    }/*from  w  w w . ja v  a2s .  c o m*/
}

Related

  1. log(Level level, String methodName, Object message)
  2. log(String message)
  3. log(String message)
  4. log(String message, Exception e)
  5. log(String method, String message)
  6. log(String msg)