Java Log to File log(String method, String message)

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

Description

log

License

Apache License

Declaration

public static void log(String method, String message) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private final static SimpleDateFormat simpleDateFomat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");

    public static void log(String method, String message) {
        System.out.printf("%s\t%-35s\t%s\n", currentTime(), method, message);
    }/*from w ww .j a  va 2 s  .co m*/

    private static String currentTime() {
        return simpleDateFomat.format(new Date());
    }
}

Related

  1. log(Level level, String methodName, Object message)
  2. log(String message)
  3. log(String message)
  4. log(String message)
  5. log(String message, Exception e)
  6. log(String msg)
  7. log(String msg)
  8. log(String name, String message)
  9. log(String tag, T msg)