Formatter.Format(LogRecord) 方法

定义

设置给定日志记录的格式并返回格式化字符串。

[Android.Runtime.Register("format", "(Ljava/util/logging/LogRecord;)Ljava/lang/String;", "GetFormat_Ljava_util_logging_LogRecord_Handler")]
public abstract string? Format(Java.Util.Logging.LogRecord? record);
[<Android.Runtime.Register("format", "(Ljava/util/logging/LogRecord;)Ljava/lang/String;", "GetFormat_Ljava_util_logging_LogRecord_Handler")>]
abstract member Format : Java.Util.Logging.LogRecord -> string

参数

record
LogRecord

要格式化的日志记录。

返回

格式化的日志记录

属性

注解

设置给定日志记录的格式并返回格式化字符串。

生成的格式化字符串通常包括 LogRecord 消息字段的本地化和格式化版本。 建议使用 Formatter#formatMessage 便捷方法本地化和设置消息字段的格式。

适用于 . 的 java.util.logging.Formatter.format(java.util.logging.LogRecord)Java 文档

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于