Logger.GetAnonymousLogger(String) 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.
Create an anonymous Logger.
[Android.Runtime.Register("getAnonymousLogger", "(Ljava/lang/String;)Ljava/util/logging/Logger;", "")]
public static Java.Util.Logging.Logger GetAnonymousLogger (string? resourceBundleName);
[<Android.Runtime.Register("getAnonymousLogger", "(Ljava/lang/String;)Ljava/util/logging/Logger;", "")>]
static member GetAnonymousLogger : string -> Java.Util.Logging.Logger
Parameters
- resourceBundleName
- String
name of ResourceBundle to be used for localizing messages for this logger. May be null if none of the messages require localization.
Returns
a newly created private Logger
- Attributes
Exceptions
if the specified resource bundle can not be loaded.
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(java.lang.String)
.
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.