intarsys runtime library

de.intarsys.tools.logging
Class LogTools

java.lang.Object
  extended by de.intarsys.tools.logging.LogTools

public class LogTools
extends Object

Tool methods to ease life with java.util.logging.


Method Summary
static void closeFileLogger(Logger logger)
          Closes a fileLogger.
static Logger createFileLogger(String id, String filePattern, boolean append)
          Creates a fileLogger.
static Logger getLogger(Class clazz)
          Get a logger that corresponds to clazz.
static String toLoggerName(Class clazz)
          The name we want to use for a logger used in clazz.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

closeFileLogger

public static void closeFileLogger(Logger logger)
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

getLogger

public static Logger getLogger(Class clazz)
Get a logger that corresponds to clazz.

Parameters:
clazz - The class object we want a logger for.
Returns:
A Logger that corresponds to clazz.

toLoggerName

public static String toLoggerName(Class clazz)
The name we want to use for a logger used in clazz. 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.

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.