다음을 통해 공유


LogRecord Class

Definition

LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.

[Android.Runtime.Register("java/util/logging/LogRecord", DoNotGenerateAcw=true)]
public class LogRecord : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
[<Android.Runtime.Register("java/util/logging/LogRecord", DoNotGenerateAcw=true)>]
type LogRecord = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
LogRecord
Attributes
Implements

Remarks

LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers.

When a LogRecord is passed into the logging framework it logically belongs to the framework and should no longer be used or updated by the client application.

Note that if the client application has not specified an explicit source method name and source class name, then the LogRecord class will infer them automatically when they are first accessed (due to a call on getSourceMethodName or getSourceClassName) by analyzing the call stack. Therefore, if a logging Handler wants to pass off a LogRecord to another thread, or to transmit it over RMI, and if it wishes to subsequently obtain method name or class name information it should call one of getSourceClassName or getSourceMethodName to force the values to be filled in.

<b> Serialization notes:</b> <ul> <li>The LogRecord class is serializable.

<li> Because objects in the parameters array may not be serializable, during serialization all objects in the parameters array are written as the corresponding Strings (using Object.toString).

<li> The ResourceBundle is not transmitted as part of the serialized form, but the resource bundle name is, and the recipient object's readObject method will attempt to locate a suitable resource bundle.

</ul>

Added in 1.4.

Java documentation for 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.

Constructors

LogRecord(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

LogRecord(Level, String)

Construct a LogRecord with the given level and message values.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Level

Get the logging message level, for example Level. -or- Set the logging message level, for example Level.

LoggerName

Get the source Logger's name. -or- Set the source Logger's name.

Message

Get the "raw" log message, before localization or formatting. -or- Set the "raw" log message, before localization or formatting.

Millis

Get event time in milliseconds since 1970. -or- Set event time.

PeerReference (Inherited from Object)
ResourceBundle

Get the localization resource bundle -or- Set the localization resource bundle.

ResourceBundleName

Get the localization resource bundle name -or- Set the localization resource bundle name.

SequenceNumber

Get the sequence number. -or- Set the sequence number.

SourceClassName

Get the name of the class that (allegedly) issued the logging request. -or- Set the name of the class that (allegedly) issued the logging request.

SourceMethodName

Get the name of the method that (allegedly) issued the logging request. -or- Set the name of the method that (allegedly) issued the logging request.

ThreadID

Get an identifier for the thread where the message originated. -or- Set an identifier for the thread where the message originated.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Thrown

Get any throwable associated with the log record. -or- Set a throwable associated with the log event.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetParameters()

Get the parameters to the log message.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetParameters(Object[])

Set the parameters to the log message.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to