LogManager.GetLogger(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.
Method to find a named logger.
[Android.Runtime.Register("getLogger", "(Ljava/lang/String;)Ljava/util/logging/Logger;", "GetGetLogger_Ljava_lang_String_Handler")]
public virtual Java.Util.Logging.Logger? GetLogger (string? name);
[<Android.Runtime.Register("getLogger", "(Ljava/lang/String;)Ljava/util/logging/Logger;", "GetGetLogger_Ljava_lang_String_Handler")>]
abstract member GetLogger : string -> Java.Util.Logging.Logger
override this.GetLogger : string -> Java.Util.Logging.Logger
Parameters
- name
- String
name of the logger
Returns
matching logger or null if none is found
- Attributes
Remarks
Method to find a named logger.
Note that since untrusted code may create loggers with arbitrary names this method should not be relied on to find Loggers for security sensitive logging. It is also important to note that the Logger associated with the String name
may be garbage collected at any time if there is no strong reference to the Logger. The caller of this method must check the return value for null in order to properly handle the case where the Logger has been garbage collected.
Java documentation for java.util.logging.LogManager.getLogger(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.