Class LogUtils
- java.lang.Object
-
- com.azure.android.core.logging.implementation.LogUtils
-
public final class LogUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringensureValidLoggerName(java.lang.String name)Returns the short logger tag (up to 23 characters) for the given logger name if the devices API level is <= 25, otherwise, the tag is unchanged.static java.lang.StringremoveNewLinesFromLogMessage(java.lang.String logMessage)Removes CR, LF or CRLF pattern in thelogMessage.
-
-
-
Method Detail
-
ensureValidLoggerName
public static java.lang.String ensureValidLoggerName(java.lang.String name)
Returns the short logger tag (up to 23 characters) for the given logger name if the devices API level is <= 25, otherwise, the tag is unchanged. Traditionally loggers are named by fully-qualified Java classes; this method attempts to return a concise identifying part of such names.
-
removeNewLinesFromLogMessage
public static java.lang.String removeNewLinesFromLogMessage(java.lang.String logMessage)
Removes CR, LF or CRLF pattern in thelogMessage.This is more performant than using
Pattern.compile("[\r\n]").- Parameters:
logMessage- The log message to sanitize.- Returns:
- The updated logMessage.
-
-