Lines Matching defs:Logger
7 * $Id: Logger.java,v 1.1.1.1.2.2 2004/07/16 23:32:29 vlad_r Exp $
28 * A simple Java version-independent logging framework. Each Logger is also
30 * logging verbosity level etc. In general, a Logger is looked up as an
37 * different from the usual log4j pattern of caching a logger in a class static
43 * <LI> message is prefixed with the prefix string set in the Logger if that is
52 * MT-safety: a given Logger instance will not get corrupted by concurrent
61 final class Logger implements ILogLevels
68 public static Logger create (final int level, final PrintWriter out, final String prefix, final Set classMask)
76 return new Logger (level, out, prefix, classMask);
89 public static Logger create (final int level, final PrintWriter out, final String prefix, final Set classMask,
90 final Logger base)
106 // TODO: do a better job of logger cloning
117 return new Logger (_level, _out, _prefix, _classMask);
299 * Provides direct access to the PrintWriter used by this Logger.
301 * @return print writer used by this logger [never null]
310 * Returns the current top of the thread-local logger stack or the static
311 * Logger instance scoped to Logger.class if the stack is empty.
313 * @return current logger [never null]
315 public static Logger getLogger ()
327 return (Logger) stack.getLast ();
335 public static void push (final Logger ctx)
350 public static void pop (final Logger ctx)
359 final Logger current = (Logger) stack.getLast ();
368 throw new IllegalStateException ("empty logger context stack on thread [" + Thread.currentThread () + "]: " + nsee);
426 private Logger (final int level, final PrintWriter out, final String prefix, final Set classMask)
558 private static final Logger STATIC_LOGGER; // set in <clinit>
565 // TODO: unfortunately, this init code makes Logger coupled to the app classes
569 final Properties properties = Property.getAppProperties (IAppConstants.APP_NAME_LC, Logger.class.getClassLoader ());