org.apache.ignite.internal.commandline

## Class CommandLogger

- java.lang.Object
- - org.apache.ignite.internal.commandline.CommandLogger

    public class CommandLogger
    extends Object

Utility class for creating `CommangHandler` log messages.

### Field Summary

Fields
`static String` `DOUBLE_INDENT` Double indent for help output.
`static String` `INDENT` Indent for help output.

### Constructor Summary

Constructors
Constructor and Description
`CommandLogger()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `errorMessage(Throwable e)` Generates readable error message from exception
`static String` `grouped(Object... params)` Join input parameters with space and wrap grouping braces `()`.
`static SB` `join(SB sb, String sbDelimeter, String delimeter, Object... params)` Join input parameters with specified `delimeter` between them and append to the end `delimeter`.
`static String` `join(String delimeter, Object... params)` Join input parameters with specified `delimeter` between them.
`static String` `optional(Object... params)` Join input parameters with space and wrap optional braces `[]`.
`static String` `or(Object... params)` Concatenates input parameters to single string with OR delimiter `|`.
`static boolean` `printErrors(Map<UUID,Exception> exceptions, String infoMsg, Logger logger)` Prints exception messages to log

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### INDENT

    public static final String INDENT

Indent for help output.

See Also:
  Constant Field Values

#### DOUBLE_INDENT

    public static final String DOUBLE_INDENT

Double indent for help output.

See Also:
  Constant Field Values

### Constructor Detail

#### CommandLogger

    public CommandLogger()

### Method Detail

#### join

    public static String join(String delimeter,
                              Object... params)

Join input parameters with specified `delimeter` between them.

Parameters:
  `delimeter` - Specified delimeter.
  `params` - Other input parameter.
Returns:
  Joined paramaters with specified `delimeter`.

#### join

    public static SB join(SB sb,
                          String sbDelimeter,
                          String delimeter,
                          Object... params)

Join input parameters with specified `delimeter` between them and append to the end `delimeter`.

Parameters:
  `sb` - Specified string builder.
  `sbDelimeter` - Delimeter between `sb` and appended `param`.
  `delimeter` - Specified delimeter.
  `params` - Other input parameter.
Returns:
  SB with appended to the end joined paramaters with specified `delimeter`.

#### optional

    public static String optional(Object... params)

Join input parameters with space and wrap optional braces `[]`.

Parameters:
  `params` - Other input parameter.
Returns:
  Joined parameters wrapped optional braces.

#### or

    public static String or(Object... params)

Concatenates input parameters to single string with OR delimiter `|`.

Parameters:
  `params` - Remaining parameters.
Returns:
  Concatenated string.

#### grouped

    public static String grouped(Object... params)

Join input parameters with space and wrap grouping braces `()`.

Parameters:
  `params` - Input parameter.
Returns:
  Joined parameters wrapped grouped braces.

#### errorMessage

    public static String errorMessage(Throwable e)

Generates readable error message from exception

Parameters:
  `e` - Exctption
Returns:
  error message

#### printErrors

    public static boolean printErrors(Map<UUID,Exception> exceptions,
                                      String infoMsg,
                                      Logger logger)

Prints exception messages to log

Parameters:
  `exceptions` - map containing node ids and exceptions
  `infoMsg` - single message to log
  `logger` - Logger to use
Returns:
  true if errors were printed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020