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 printf-style (%s/%d/…) formatting for messages with arguments.

  • Method Details

    • err

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

      Arguments are formatted using printf-style (%s) placeholders.

      Useful for debug messages.

      Example:

      Console.err("myPojo=%s", myPojo);

      Parameters:
      msg - The printf-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 printf-style (%s) placeholders.

      Useful for debug messages.

      Example:

      Console.out("myPojo=%s", myPojo);

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