Java Log Message log(final PrintStream logger, final Object message)

Here you can find the source of log(final PrintStream logger, final Object message)

Description

Write a message to the given print stream.

License

Apache License

Parameter

Parameter Description
logger PrintStream
message to log.

Declaration

public static void log(final PrintStream logger, final Object message) 

Method Source Code

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

import java.io.PrintStream;

public class Main {
    /**// ww  w .j  a  v  a  2s  .c  o  m
     * Write a message to the given print stream.
     *
     * @param logger {@link PrintStream}
     * @param message to log.
     */
    public static void log(final PrintStream logger, final Object message) {
        if (logger != null) {
            logger.println(message);
        }
    }
}

Related

  1. log(boolean console, boolean file)
  2. log(final PrintStream logger, final String message)
  3. log(final String file, final String msg)
  4. log(final String message, final String file)
  5. log(int physicalId, String message)