Formatter.FormatMessage(LogRecord) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Localize and format the message string from a log record.
[Android.Runtime.Register("formatMessage", "(Ljava/util/logging/LogRecord;)Ljava/lang/String;", "GetFormatMessage_Ljava_util_logging_LogRecord_Handler")]
public virtual string? FormatMessage (Java.Util.Logging.LogRecord? record);
[<Android.Runtime.Register("formatMessage", "(Ljava/util/logging/LogRecord;)Ljava/lang/String;", "GetFormatMessage_Ljava_util_logging_LogRecord_Handler")>]
abstract member FormatMessage : Java.Util.Logging.LogRecord -> string
override this.FormatMessage : Java.Util.Logging.LogRecord -> string
Parameters
- record
- LogRecord
the log record containing the raw message
Returns
a localized and formatted message
- Attributes
Remarks
Localize and format the message string from a log record. This method is provided as a convenience for Formatter subclasses to use when they are performing formatting.
The message string is first localized to a format string using the record's ResourceBundle. (If there is no ResourceBundle, or if the message key is not found, then the key is used as the format string.) The format String uses java.text style formatting. <ul> <li>If there are no parameters, no formatter is used. <li>Otherwise, if the string contains "{0" then java.text.MessageFormat is used to format the string. <li>Otherwise no formatting is performed. </ul>
Java documentation for java.util.logging.Formatter.formatMessage(java.util.logging.LogRecord)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.