Class Console

java.lang.Object
org.apache.juneau.commons.io.Console

public class Console extends Object
A utility for logging formatted messages to the console.

Uses MessageFormat for formatting messages with arguments.

  • Constructor Details

    • Console

      public Console()
      Constructor.
  • Method Details

    • err

      public static final void err(String msg, Object... args)
      Prints a message with arguments to System.err.

      Arguments are formatted using MessageFormat.

      Useful for debug messages.

      Example:

      Console.err("myPojo={0}", myPojo);

      Parameters:
      msg - The MessageFormat-styled message.
      args - The arguments sent to the formatter.
    • out

      public static final void out(String msg, Object... args)
      Prints a message with arguments to System.out.

      Arguments are formatted using MessageFormat.

      Useful for debug messages.

      Example:

      Console.out("myPojo={0}", myPojo);

      Parameters:
      msg - The MessageFormat-styled message.
      args - The arguments sent to the formatter.