Package de.intarsys.tools.logging
Class LogTools
java.lang.Object
de.intarsys.tools.logging.LogTools
Tool methods to ease life with java.util.logging.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeFileLogger
(Logger logger) Closes a fileLogger.static Logger
createFileLogger
(String id, String filePattern, boolean append) Creates a fileLogger.dumpObject
(String prefix, Object object) dumpObject
(String prefix, Object object, IDumpObject details) static Logger
Get a logger that corresponds toclazz
.static Logger
Get a logger for namename
.static String
toLoggerName
(Class<?> clazz) The name we want to use for a logger used inclazz
.
-
Field Details
-
INDENT
- See Also:
-
-
Method Details
-
closeFileLogger
Closes a fileLogger. -
createFileLogger
public static Logger createFileLogger(String id, String filePattern, boolean append) throws SecurityException, IOException Creates a fileLogger.- Returns:
- A Logger named with 'id'.
- Throws:
IOException
SecurityException
-
dumpObject
-
dumpObject
-
getLogger
Get a logger that corresponds toclazz
.- Parameters:
clazz
- The class object we want a logger for.- Returns:
- A Logger that corresponds to clazz.
-
getLogger
Get a logger for namename
.- Parameters:
name
- The logger name/category- Returns:
- Get a logger for name
name
.
-
toLoggerName
The name we want to use for a logger used inclazz
. This implementation uses the package name.- Parameters:
clazz
- The class object we want a name for.- Returns:
- The name we want to use for a logger used in
clazz
.
-