edu.mscd.cs.javaln
Class JavaLN

java.lang.Object
  extended by java.util.logging.Logger
      extended by edu.mscd.cs.javaln.JavaLN

public class JavaLN
extends java.util.logging.Logger

A class that gets all calling method names automatically, easing the use of logging.


Field Summary
 
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
 
Constructor Summary
  JavaLN()
          Create a logger whose name is the calling class's.
  JavaLN(java.lang.String s)
          Create a logger whose name passed in
protected JavaLN(java.lang.String s, java.lang.String t)
           
 
Method Summary
 void config(boolean b)
           
 void config(byte b)
           
 void config(char c)
           
 void config(double d)
           
 void config(float f)
           
 void config(int i)
           
 void config(long l)
           
 void config(java.lang.Object o)
           
 void config(short s)
           
 void config(java.lang.Throwable t)
           
 void entering()
          Log entering a method without having to pass the class and method names.
 void entering(boolean b)
           
 void entering(byte b)
           
 void entering(char c)
           
 void entering(double d)
           
 void entering(float f)
           
 void entering(int i)
           
 void entering(long l)
           
 void entering(java.lang.Object o)
          Log entering a method without having to pass the class and method names.
 void entering(java.lang.Object[] o)
          Log entering a method without having to pass the class and method names.
 void entering(short s)
           
 void exiting()
          Log leaving a method without having to pass the class and method names.
 void exiting(boolean b)
           
 void exiting(byte b)
           
 void exiting(char c)
           
 void exiting(double d)
           
 void exiting(float f)
           
 void exiting(int i)
           
 void exiting(long l)
           
 void exiting(java.lang.Object o)
          Log leaving a method without having to pass the class and method names.
 void exiting(short s)
           
 void fine(boolean b)
           
 void fine(byte b)
           
 void fine(char c)
           
 void fine(double d)
           
 void fine(float f)
           
 void fine(int i)
           
 void fine(long l)
           
 void fine(java.lang.Object o)
           
 void fine(short s)
           
 void fine(java.lang.Throwable t)
           
 void finer(boolean b)
           
 void finer(byte b)
           
 void finer(char c)
           
 void finer(double d)
           
 void finer(float f)
           
 void finer(int i)
           
 void finer(long l)
           
 void finer(java.lang.Object o)
           
 void finer(short s)
           
 void finer(java.lang.Throwable t)
           
 void finest(boolean b)
           
 void finest(byte b)
           
 void finest(char c)
           
 void finest(double d)
           
 void finest(float f)
           
 void finest(int i)
           
 void finest(long l)
           
 void finest(java.lang.Object o)
           
 void finest(short s)
           
 void finest(java.lang.Throwable t)
           
static java.util.logging.Level getLevel(java.lang.String s)
           
static java.util.logging.Logger getLogger()
          Get a logger named after the class.
static java.util.logging.Logger getLogger(java.lang.String s)
           
 void info(boolean b)
           
 void info(byte b)
           
 void info(char c)
           
 void info(double d)
           
 void info(float f)
           
 void info(int i)
           
 void info(long l)
           
 void info(java.lang.Object o)
           
 void info(short s)
           
 void info(java.lang.Throwable t)
           
static void main(java.lang.String[] args)
           
 java.util.logging.Level setThrowingLevel(java.util.logging.Level l)
           
 void severe(boolean b)
           
 void severe(byte b)
           
 void severe(char c)
           
 void severe(double d)
           
 void severe(float f)
           
 void severe(int i)
           
 void severe(long l)
           
 void severe(java.lang.Object o)
           
 void severe(short s)
           
 void severe(java.lang.Throwable t)
           
 void throwing(java.lang.Throwable t)
          Log throwing without having to pass the class and method names.
 java.lang.String toString()
           
 void useLineNumberFormatter(boolean use)
          Set whether or not to use LineNumberFormatter for this logger.
 void warning(boolean b)
           
 void warning(byte b)
           
 void warning(char c)
           
 void warning(double d)
           
 void warning(float f)
           
 void warning(int i)
           
 void warning(long l)
           
 void warning(java.lang.Object o)
           
 void warning(short s)
           
 void warning(java.lang.Throwable t)
           
 
Methods inherited from class java.util.logging.Logger
addHandler, config, entering, entering, entering, exiting, exiting, fine, finer, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getHandlers, getLevel, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, isLoggable, log, log, log, log, log, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setUseParentHandlers, severe, throwing, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaLN

public JavaLN()
Create a logger whose name is the calling class's.


JavaLN

public JavaLN(java.lang.String s)
Create a logger whose name passed in

Parameters:
s - the name of the logger.

JavaLN

protected JavaLN(java.lang.String s,
                 java.lang.String t)
Method Detail

useLineNumberFormatter

public void useLineNumberFormatter(boolean use)
Set whether or not to use LineNumberFormatter for this logger. If true and there is no associated ConsoleHandler, create one, set the Formatter to LineNumberFormatter, and setUseParentHandlers to false. If false, find any instances of ConsoleHandler and set the formatter to SimpleFormatter. Okay, this is a little ugly, but i often want to use LineNumberFormatter and this simplifies that.


getLogger

public static java.util.logging.Logger getLogger()
Get a logger named after the class.


getLogger

public static java.util.logging.Logger getLogger(java.lang.String s)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

entering

public void entering()
Log entering a method without having to pass the class and method names.


entering

public void entering(java.lang.Object o)
Log entering a method without having to pass the class and method names.

Parameters:
o - the Object logged along with the class and method.

entering

public void entering(byte b)

entering

public void entering(short s)

entering

public void entering(int i)

entering

public void entering(long l)

entering

public void entering(float f)

entering

public void entering(double d)

entering

public void entering(boolean b)

entering

public void entering(char c)

entering

public void entering(java.lang.Object[] o)
Log entering a method without having to pass the class and method names.

Parameters:
o - the array of Objects logged along with the class and method.

exiting

public void exiting()
Log leaving a method without having to pass the class and method names.


exiting

public void exiting(java.lang.Object o)
Log leaving a method without having to pass the class and method names.

Parameters:
o - the Object logged along with the class and method.

exiting

public void exiting(byte b)

exiting

public void exiting(short s)

exiting

public void exiting(int i)

exiting

public void exiting(long l)

exiting

public void exiting(float f)

exiting

public void exiting(double d)

exiting

public void exiting(boolean b)

exiting

public void exiting(char c)

setThrowingLevel

public java.util.logging.Level setThrowingLevel(java.util.logging.Level l)

throwing

public void throwing(java.lang.Throwable t)
Log throwing without having to pass the class and method names.

Parameters:
t - the Throwable.

severe

public void severe(java.lang.Object o)

warning

public void warning(java.lang.Object o)

info

public void info(java.lang.Object o)

config

public void config(java.lang.Object o)

fine

public void fine(java.lang.Object o)

finer

public void finer(java.lang.Object o)

finest

public void finest(java.lang.Object o)

severe

public void severe(byte b)

warning

public void warning(byte b)

info

public void info(byte b)

config

public void config(byte b)

fine

public void fine(byte b)

finer

public void finer(byte b)

finest

public void finest(byte b)

severe

public void severe(short s)

warning

public void warning(short s)

info

public void info(short s)

config

public void config(short s)

fine

public void fine(short s)

finer

public void finer(short s)

finest

public void finest(short s)

severe

public void severe(int i)

warning

public void warning(int i)

info

public void info(int i)

config

public void config(int i)

fine

public void fine(int i)

finer

public void finer(int i)

finest

public void finest(int i)

severe

public void severe(long l)

warning

public void warning(long l)

info

public void info(long l)

config

public void config(long l)

fine

public void fine(long l)

finer

public void finer(long l)

finest

public void finest(long l)

severe

public void severe(float f)

warning

public void warning(float f)

info

public void info(float f)

config

public void config(float f)

fine

public void fine(float f)

finer

public void finer(float f)

finest

public void finest(float f)

severe

public void severe(double d)

warning

public void warning(double d)

info

public void info(double d)

config

public void config(double d)

fine

public void fine(double d)

finer

public void finer(double d)

finest

public void finest(double d)

severe

public void severe(boolean b)

warning

public void warning(boolean b)

info

public void info(boolean b)

config

public void config(boolean b)

fine

public void fine(boolean b)

finer

public void finer(boolean b)

finest

public void finest(boolean b)

severe

public void severe(char c)

warning

public void warning(char c)

info

public void info(char c)

config

public void config(char c)

fine

public void fine(char c)

finer

public void finer(char c)

finest

public void finest(char c)

severe

public void severe(java.lang.Throwable t)

warning

public void warning(java.lang.Throwable t)

info

public void info(java.lang.Throwable t)

config

public void config(java.lang.Throwable t)

fine

public void fine(java.lang.Throwable t)

finer

public void finer(java.lang.Throwable t)

finest

public void finest(java.lang.Throwable t)

getLevel

public static java.util.logging.Level getLevel(java.lang.String s)

main

public static void main(java.lang.String[] args)