Share via


Logger.AnonymousLogger Property

Definition

Create an anonymous Logger.

public static Java.Util.Logging.Logger AnonymousLogger { [Android.Runtime.Register("getAnonymousLogger", "()Ljava/util/logging/Logger;", "")] get; }
[<get: Android.Runtime.Register("getAnonymousLogger", "()Ljava/util/logging/Logger;", "")>]
static member AnonymousLogger : Java.Util.Logging.Logger

Property Value

a newly created private Logger

Attributes

Remarks

Create an anonymous Logger. The newly created Logger is not registered in the LogManager namespace. There will be no access checks on updates to the logger.

This factory method is primarily intended for use from applets. Because the resulting Logger is anonymous it can be kept private by the creating class. This removes the need for normal security checks, which in turn allows untrusted applet code to update the control state of the Logger. For example an applet can do a setLevel or an addHandler on an anonymous Logger.

Even although the new logger is anonymous, it is configured to have the root logger ("") as its parent. This means that by default it inherits its effective level and handlers from the root logger. Changing its parent via the #setParent(java.util.logging.Logger) setParent method will still require the security permission specified by that method.

Java documentation for java.util.logging.Logger.getAnonymousLogger().

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