Class LoggerMessageFormat
java.lang.Object
org.opensearch.core.common.logging.LoggerMessageFormat
Format string for OpenSearch log messages.
This class is almost a copy of org.slf4j.helpers.MessageFormatter
The original code is licensed under the MIT License and is available at : MessageFormatter.java
- Opensearch.internal:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LoggerMessageFormat
public LoggerMessageFormat()
-
-
Method Details
-
format
-
format
(this is almost a copy oforg.slf4j.helpers.MessageFormatter.arrayFormat)- Parameters:
prefix- the prefix to prepend to the formatted message (can be null)messagePattern- the message pattern which will be parsed and formattedargArray- an array of arguments to be substituted in place of formatting anchors- Returns:
- null if messagePattern is null
messagePattern if argArray is (null or empty) and prefix is null
prefix + messagePattern if argArray is (null or empty) and prefix is not null
formatted message otherwise (even if prefix is null)
-