Java Date Format Pattern log(String format, Object... args)

Here you can find the source of log(String format, Object... args)

Description

log

License

Open Source License

Declaration

public static void log(String format, Object... args) 

Method Source Code

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

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

public class Main {
    public static void log(String format, Object... args) {
        StackTraceElement[] stack = Thread.currentThread().getStackTrace();
        StackTraceElement callee = stack[2];
        String calleeClassname = callee.getClassName();
        String timestamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")
                .format(new Date());
        System.err.printf(//from  w w w  . java 2s.c  o m
                timestamp + " " + calleeClassname + ": " + format, args);
    }
}

Related

  1. getSortedTimetampFormat()
  2. getStringAcordFormat()
  3. getSupportedFormats()
  4. isEqual(String d1, String d2, String format)
  5. isValidFormat(String format, String value)
  6. logFormat(String msg)
  7. subFiles(String formatString, File[] files)
  8. subtraiHora(String horaFim, String horaIni, String formatoHora)
  9. sysdateStringddMMyyyyhhmmss()