Class Log
- java.lang.Object
-
- net.sourceforge.uiq3.Log
-
public final class Log extends Object
Project specific logger
- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Field Summary
Fields Modifier and Type Field Description private static Logger
Logger
Class logger instance.private static int
Max_Tag_Length
maximum tag length when android.util.Log.isLoggable is usedprivate static String
TAG
Class logger tag.private static String
Trim_Text
remove from the beginning of the log tag.
-
Constructor Summary
Constructors Modifier Constructor Description private
Log()
Utility class
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static String
format(@NotNull String msg, @Nullable Object... args)
formatiert eine nachricht mit parameters wenn diese gegeben sind.static String
getLogTag(@NotNull Class<?> clazz)
creates a log Tag for the given class.static String
getLogTag(@NotNull String name)
creates a log Tag for the given class.static String
getUIQ3LogTag(@NotNull Class<?> clazz)
creates a log Tag for the given class.static String
getUIQ3LogTag(@NotNull String name)
creates a log Tag for the given class.
-
-
-
Field Detail
-
Logger
private static final Logger Logger
Class logger instance.
-
TAG
private static final String TAG
Class logger tag.
-
Max_Tag_Length
private static final int Max_Tag_Length
maximum tag length when android.util.Log.isLoggable is used
- See Also:
- Constant Field Values
-
Trim_Text
private static final String Trim_Text
remove from the beginning of the log tag. It's redundant.
- See Also:
- Constant Field Values
-
-
Method Detail
-
format
private static String format(@NotNull @NotNull String msg, @Nullable @Nullable Object... args)
formatiert eine nachricht mit parameters wenn diese gegeben sind. Sonst wird der string ungeändert zurückgeliefert.
- Parameters:
msg
- nachrichtargs
- parameter für die nachricht.- Returns:
- die formatierte nachricht.
- See Also:
String.format(String, Object...)
-
getLogTag
public static String getLogTag(@NotNull @NotNull Class<?> clazz)
creates a log Tag for the given class. It is ensured that the Log tag does not exceeds the allowed maximum of 23 characters used by android.util.Log.isLoggable
- Parameters:
clazz
- class name to create a log tag for- Returns:
- a log tag of maximum 23 characters.
-
getLogTag
public static String getLogTag(@NotNull @NotNull String name)
creates a log Tag for the given class. It is ensured that the Log tag does not exceeds the allowed maximum of 23 characters used by android.util.Log.isLoggable
- Parameters:
name
- class name to create a log tag for- Returns:
- a log tag of maximum 23 characters.
-
getUIQ3LogTag
public static String getUIQ3LogTag(@NotNull @NotNull Class<?> clazz)
creates a log Tag for the given class. It is ensured that the Log tag does not exceeds the allowed maximum of 23 characters used by android.util.Log.isLoggable
- Parameters:
clazz
- class name to create a log tag for- Returns:
- a log tag of maximum 23 characters.
-
getUIQ3LogTag
public static String getUIQ3LogTag(@NotNull @NotNull String name)
creates a log Tag for the given class. It is ensured that the Log tag does not exceeds the allowed maximum of 23 characters used by @link android.util.Log.isLoggable}
- Parameters:
name
- class name to create a log tag for- Returns:
- a log tag of maximum 23 characters.
-
-