Java Utililty Methods Log to File

List of utility methods to do Log to File

Description

The list of methods to do Log to File are organized into topic(s).

Method

voidlog(Level level, String methodName, Object message)
Writes a log entry.
Object[] args = { methodName, message };
logger.log(level, MessageFormat.format(logEntryTemplate, args));
voidlog(String message)
log
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);
voidlog(String message)
log
log(message, null);
voidlog(String message)
log
System.out.println(message);
voidlog(String message, Exception e)
log
log(message, "", e);
voidlog(String method, String message)
log
System.out.printf("%s\t%-35s\t%s\n", currentTime(), method, message);
voidlog(String msg)
log
Date date = new Date();
System.err.println("[" + DATE_FORMAT.format(date) + "] " + msg);
voidlog(String msg)
log
if (osType.equals("z/OS")) {
    System.out.println(timestampFormat.format(new Date()) + ":" + msg);
} else
    System.out.println("[" + timestampFormat.format(new Date()) + "] " + msg);
voidlog(String name, String message)
log
String date = dateFormat.format(new Date());
System.out.println("[" + date + "]\t" + name + ".java\t - " + message);
voidlog(String tag, T msg)
log
print(DATE_FORMAT.format(new Date()));
print("  ");
if (isEmpty(tag)) {
    println(msg);
} else {
    println(tag + ": " + msg);