StreamHandler.Publish(LogRecord) Method

Definition

Format and publish a LogRecord.

[Android.Runtime.Register("publish", "(Ljava/util/logging/LogRecord;)V", "GetPublish_Ljava_util_logging_LogRecord_Handler")]
public override void Publish (Java.Util.Logging.LogRecord? record);
[<Android.Runtime.Register("publish", "(Ljava/util/logging/LogRecord;)V", "GetPublish_Ljava_util_logging_LogRecord_Handler")>]
override this.Publish : Java.Util.Logging.LogRecord -> unit

Parameters

record
LogRecord

description of the log event. A null record is silently ignored and is not published

Attributes

Remarks

Format and publish a LogRecord.

The StreamHandler first checks if there is an OutputStream and if the given LogRecord has at least the required log level. If not it silently returns. If so, it calls any associated Filter to check if the record should be published. If so, it calls its Formatter to format the record and then writes the result to the current output stream.

If this is the first LogRecord to be written to a given OutputStream, the Formatter's "head" string is written to the stream before the LogRecord is written.

Java documentation for java.util.logging.StreamHandler.publish(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.

Applies to