JBoss LogManager 1.0.0.GA

org.jboss.logmanager
Class LogContext

java.lang.Object
  extended by org.jboss.logmanager.LogContext

public final class LogContext
extends Object

A logging context, for producing isolated logging environments.


Method Summary
static LogContext create()
          Create a new log context.
static LogContext getLogContext()
          Get the currently active log context.
 Logger getLogger(String name)
          Get a logger with the given name from this logging context.
static LogContext getSystemLogContext()
          Get the system log context.
static void setLogContextSelector(LogContextSelector newSelector)
          Set a new log context selector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static LogContext create()
Create a new log context. If a security manager is installed, the caller must have the "createLogContext" RuntimePermission to invoke this method.

Returns:
a new log context

getLogger

public Logger getLogger(String name)
Get a logger with the given name from this logging context.

Parameters:
name - the logger name
Returns:
the logger instance
See Also:
LogManager.getLogger(String)

getSystemLogContext

public static LogContext getSystemLogContext()
Get the system log context.

Returns:
the system log context

getLogContext

public static LogContext getLogContext()
Get the currently active log context.

Returns:
the currently active log context

setLogContextSelector

public static void setLogContextSelector(LogContextSelector newSelector)
Set a new log context selector. If a security manager is installed, the caller must have the "setLogContextSelector" RuntimePermission to invoke this method.

Parameters:
newSelector - the new selector.

JBoss LogManager 1.0.0.GA

Copyright © 2009 JBoss, a division of Red Hat, Inc.