Java 类org.apache.catalina.Logger 实例源码

项目:jerrydog    文件:WebappLoader.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
private void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("WebappLoader[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("WebappLoader[" + containerName
                           + "]: " + message);
    }

}
项目:jerrydog    文件:WebappLoader.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null) {
        logger.log("WebappLoader[" + container.getName() + "] "
                   + message, throwable);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("WebappLoader[" + containerName
                           + "]: " + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:HostConfig.java   
/**
 * Log a message on the Logger associated with our Host (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    if (host != null)
        logger = host.getLogger();
    if (logger != null)
        logger.log("HostConfig[" + host.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("HostConfig[" + host.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:ContextConfig.java   
/**
 * Log a message on the Logger associated with our Context (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (context != null)
        logger = context.getLogger();
    if (logger != null)
        logger.log("ContextConfig[" + context.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("ContextConfig[" + context.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:UserConfig.java   
/**
 * Log a message on the Logger associated with our Host (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (host != null)
        logger = host.getLogger();
    if (logger != null)
        logger.log("UserConfig[" + host.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("UserConfig[" + host.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:StoreBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
protected void log(String message) {
    Logger logger = null;
    Container container = manager.getContainer();

    if (container != null)
        logger = container.getLogger();

    if (logger != null) {
        logger.log(getStoreName()+"[" + container.getName() + "]: "
                   + message);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getStoreName()+"[" + containerName
                           + "]: " + message);
    }
}
项目:jerrydog    文件:ManagerBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log(getName() + "[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
    }

}
项目:jerrydog    文件:ManagerBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log(getName() + "[" + container.getName() + "] "
                   + message, throwable);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:MBeanUtils.java   
/**
 * Create, register, and return an MBean for this
 * <code>Logger</code> object.
 *
 * @param logger The Logger to be managed
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public static ModelMBean createMBean(Logger logger)
    throws Exception {

    String mname = createManagedName(logger);
    ManagedBean managed = registry.findManagedBean(mname);
    if (managed == null) {
        Exception e = new Exception("ManagedBean is not found with "+mname);
        throw new MBeanException(e);
    }
    String domain = managed.getDomain();
    if (domain == null)
        domain = mserver.getDefaultDomain();
    ModelMBean mbean = managed.createMBean(logger);
    ObjectName oname = createObjectName(domain, logger);
    mserver.registerMBean(mbean, oname);
    return (mbean);

}
项目:jerrydog    文件:MBeanUtils.java   
/**
 * Deregister the MBean for this
 * <code>Logger</code> object.
 *
 * @param logger The Logger to be managed
 *
 * @exception Exception if an MBean cannot be deregistered
 */
public static void destroyMBean(Logger logger)
    throws Exception {

    String mname = createManagedName(logger);
    ManagedBean managed = registry.findManagedBean(mname);
    if (managed == null) {
        return;
    }
    String domain = managed.getDomain();
    if (domain == null)
        domain = mserver.getDefaultDomain();
    ObjectName oname = createObjectName(domain, logger);
    mserver.unregisterMBean(oname);

}
项目:jerrydog    文件:RealmBase.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
protected void log(String message) {

    Logger logger = null;
    String name = null;
    if (container != null) {
        logger = container.getLogger();
        name = container.getName();
    }

    if (logger != null) {
        logger.log(getName()+"[" + name + "]: " + message);
    } else {
        System.out.println(getName()+"[" + name + "]: " + message);
    }

}
项目:jerrydog    文件:RealmBase.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    String name = null;
    if (container != null) {
        logger = container.getLogger();
        name = container.getName();
    }

    if (logger != null) {
        logger.log(getName()+"[" + name + "]: " + message, throwable);
    } else {
        System.out.println(getName()+"[" + name + "]: " + message);
        throwable.printStackTrace(System.out);
    }
}
项目:jerrydog    文件:StandardCluster.java   
/**
 * Returns a <code>ClusterSender</code> which is the interface
 * to use when sending information in the Cluster. senderId is
 * used as a identifier so that information sent through this
 * instance can only be used with the respectice
 * <code>ClusterReceiver</code>
 *
 * @return The ClusterSender
 */
public ClusterSender getClusterSender(String senderId) {
    Logger logger = null;
    MulticastSender send = new MulticastSender(senderId,
                                               multicastSocket,
                                               multicastAddress,
                                               multicastPort);
    if (container != null)
        logger = container.getLogger();

    send.setLogger(logger);
    send.setDebug(debug);

    if(debug > 1)
        log(sm.getString("standardCluster.createSender", senderId));

    return(send);
}
项目:jerrydog    文件:StandardCluster.java   
/**
 * Returns a <code>ClusterReceiver</code> which is the interface
 * to use when receiving information in the Cluster. senderId is
 * used as a indentifier, only information send through the
 * <code>ClusterSender</code> with the same senderId can be received.
 *
 * @return The ClusterReceiver
 */
public ClusterReceiver getClusterReceiver(String senderId) {
    Logger logger = null;
    MulticastReceiver recv = new MulticastReceiver(senderId,
                                                   multicastSocket,
                                                   multicastAddress,
                                                   multicastPort);

    if (container != null)
        logger = container.getLogger();

    recv.setDebug(debug);
    recv.setLogger(logger);
    recv.setCheckInterval(checkInterval);
    recv.start();

    if(debug > 1)
        log(sm.getString("standardCluster.createReceiver", senderId));

    return(recv);
}
项目:jerrydog    文件:StandardCluster.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
protected void log(String message) {
    Logger logger = null;

    if (container != null)
        logger = container.getLogger();

    if (logger != null) {
        logger.log(getName() + "[" + container.getName() + "]: "
                   + message);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();

        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
    }
}
项目:jerrydog    文件:StandardPipeline.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardPipeline[" + container.getName() + "]: " +
                   message, throwable);
    else {
        System.out.println("StandardPipeline[" + container.getName() +
                           "]: " + message);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:StandardWrapperValve.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
private void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardWrapperValve[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("StandardWrapperValve[" + containerName
                           + "]: " + message);
    }

}
项目:jerrydog    文件:StandardWrapperValve.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardWrapperValve[" + container.getName() + "]: "
                   + message, throwable);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("StandardWrapperValve[" + containerName
                           + "]: " + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:NamingContextListener.java   
/**
 * Log the specified message and exception to our current Logger
 * (if any).
 *
 * @param message Message to be logged
 * @param throwable Related exception
 */
protected void log(String message, Throwable throwable) {

    if (!(container instanceof Container)) {
        System.out.println(logName() + ": " + message + ": " + throwable);
        throwable.printStackTrace(System.out);
        return;
    }

    Logger logger = ((Container) container).getLogger();
    if (logger != null)
        logger.log(logName() + ": " + message, throwable);
    else {
        System.out.println(logName() + ": " + message + ": " + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:WebappLoader.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
private void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("WebappLoader[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("WebappLoader[" + containerName
                           + "]: " + message);
    }

}
项目:HowTomcatWorks    文件:WebappLoader.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null) {
        logger.log("WebappLoader[" + container.getName() + "] "
                   + message, throwable);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("WebappLoader[" + containerName
                           + "]: " + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:HostConfig.java   
/**
 * Log a message on the Logger associated with our Host (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    if (host != null)
        logger = host.getLogger();
    if (logger != null)
        logger.log("HostConfig[" + host.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("HostConfig[" + host.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:ContextConfig.java   
/**
 * Log a message on the Logger associated with our Context (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (context != null)
        logger = context.getLogger();
    if (logger != null)
        logger.log("ContextConfig[" + context.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("ContextConfig[" + context.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:UserConfig.java   
/**
 * Log a message on the Logger associated with our Host (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (host != null)
        logger = host.getLogger();
    if (logger != null)
        logger.log("UserConfig[" + host.getName() + "] "
                   + message, throwable);
    else {
        System.out.println("UserConfig[" + host.getName() + "]: "
                           + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:StoreBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
protected void log(String message) {
    Logger logger = null;
    Container container = manager.getContainer();

    if (container != null)
        logger = container.getLogger();

    if (logger != null) {
        logger.log(getStoreName()+"[" + container.getName() + "]: "
                   + message);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getStoreName()+"[" + containerName
                           + "]: " + message);
    }
}
项目:HowTomcatWorks    文件:ManagerBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log(getName() + "[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
    }

}
项目:HowTomcatWorks    文件:ManagerBase.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log(getName() + "[" + container.getName() + "] "
                   + message, throwable);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:MBeanUtils.java   
/**
 * Create, register, and return an MBean for this
 * <code>Logger</code> object.
 *
 * @param logger The Logger to be managed
 *
 * @exception Exception if an MBean cannot be created or registered
 */
public static ModelMBean createMBean(Logger logger)
    throws Exception {

    String mname = createManagedName(logger);
    ManagedBean managed = registry.findManagedBean(mname);
    if (managed == null) {
        Exception e = new Exception("ManagedBean is not found with "+mname);
        throw new MBeanException(e);
    }
    String domain = managed.getDomain();
    if (domain == null)
        domain = mserver.getDefaultDomain();
    ModelMBean mbean = managed.createMBean(logger);
    ObjectName oname = createObjectName(domain, logger);
    mserver.registerMBean(mbean, oname);
    return (mbean);

}
项目:HowTomcatWorks    文件:MBeanUtils.java   
/**
 * Deregister the MBean for this
 * <code>Logger</code> object.
 *
 * @param logger The Logger to be managed
 *
 * @exception Exception if an MBean cannot be deregistered
 */
public static void destroyMBean(Logger logger)
    throws Exception {

    String mname = createManagedName(logger);
    ManagedBean managed = registry.findManagedBean(mname);
    if (managed == null) {
        return;
    }
    String domain = managed.getDomain();
    if (domain == null)
        domain = mserver.getDefaultDomain();
    ObjectName oname = createObjectName(domain, logger);
    mserver.unregisterMBean(oname);

}
项目:HowTomcatWorks    文件:RealmBase.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
protected void log(String message) {

    Logger logger = null;
    String name = null;
    if (container != null) {
        logger = container.getLogger();
        name = container.getName();
    }

    if (logger != null) {
        logger.log(getName()+"[" + name + "]: " + message);
    } else {
        System.out.println(getName()+"[" + name + "]: " + message);
    }

}
项目:HowTomcatWorks    文件:RealmBase.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    String name = null;
    if (container != null) {
        logger = container.getLogger();
        name = container.getName();
    }

    if (logger != null) {
        logger.log(getName()+"[" + name + "]: " + message, throwable);
    } else {
        System.out.println(getName()+"[" + name + "]: " + message);
        throwable.printStackTrace(System.out);
    }
}
项目:HowTomcatWorks    文件:StandardCluster.java   
/**
 * Returns a <code>ClusterSender</code> which is the interface
 * to use when sending information in the Cluster. senderId is
 * used as a identifier so that information sent through this
 * instance can only be used with the respectice
 * <code>ClusterReceiver</code>
 *
 * @return The ClusterSender
 */
public ClusterSender getClusterSender(String senderId) {
    Logger logger = null;
    MulticastSender send = new MulticastSender(senderId,
                                               multicastSocket,
                                               multicastAddress,
                                               multicastPort);
    if (container != null)
        logger = container.getLogger();

    send.setLogger(logger);
    send.setDebug(debug);

    if(debug > 1)
        log(sm.getString("standardCluster.createSender", senderId));

    return(send);
}
项目:HowTomcatWorks    文件:StandardCluster.java   
/**
 * Returns a <code>ClusterReceiver</code> which is the interface
 * to use when receiving information in the Cluster. senderId is
 * used as a indentifier, only information send through the
 * <code>ClusterSender</code> with the same senderId can be received.
 *
 * @return The ClusterReceiver
 */
public ClusterReceiver getClusterReceiver(String senderId) {
    Logger logger = null;
    MulticastReceiver recv = new MulticastReceiver(senderId,
                                                   multicastSocket,
                                                   multicastAddress,
                                                   multicastPort);

    if (container != null)
        logger = container.getLogger();

    recv.setDebug(debug);
    recv.setLogger(logger);
    recv.setCheckInterval(checkInterval);
    recv.start();

    if(debug > 1)
        log(sm.getString("standardCluster.createReceiver", senderId));

    return(recv);
}
项目:HowTomcatWorks    文件:StandardCluster.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 */
protected void log(String message) {
    Logger logger = null;

    if (container != null)
        logger = container.getLogger();

    if (logger != null) {
        logger.log(getName() + "[" + container.getName() + "]: "
                   + message);
    } else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();

        System.out.println(getName() + "[" + containerName
                           + "]: " + message);
    }
}
项目:HowTomcatWorks    文件:StandardPipeline.java   
/**
 * Log a message on the Logger associated with our Container (if any).
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
protected void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardPipeline[" + container.getName() + "]: " +
                   message, throwable);
    else {
        System.out.println("StandardPipeline[" + container.getName() +
                           "]: " + message);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:StandardWrapperValve.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 */
private void log(String message) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardWrapperValve[" + container.getName() + "]: "
                   + message);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("StandardWrapperValve[" + containerName
                           + "]: " + message);
    }

}
项目:HowTomcatWorks    文件:StandardWrapperValve.java   
/**
 * Log a message on the Logger associated with our Container (if any)
 *
 * @param message Message to be logged
 * @param throwable Associated exception
 */
private void log(String message, Throwable throwable) {

    Logger logger = null;
    if (container != null)
        logger = container.getLogger();
    if (logger != null)
        logger.log("StandardWrapperValve[" + container.getName() + "]: "
                   + message, throwable);
    else {
        String containerName = null;
        if (container != null)
            containerName = container.getName();
        System.out.println("StandardWrapperValve[" + containerName
                           + "]: " + message);
        System.out.println("" + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:HowTomcatWorks    文件:NamingContextListener.java   
/**
 * Log the specified message and exception to our current Logger
 * (if any).
 *
 * @param message Message to be logged
 * @param throwable Related exception
 */
protected void log(String message, Throwable throwable) {

    if (!(container instanceof Container)) {
        System.out.println(logName() + ": " + message + ": " + throwable);
        throwable.printStackTrace(System.out);
        return;
    }

    Logger logger = ((Container) container).getLogger();
    if (logger != null)
        logger.log(logName() + ": " + message, throwable);
    else {
        System.out.println(logName() + ": " + message + ": " + throwable);
        throwable.printStackTrace(System.out);
    }

}
项目:jerrydog    文件:Embedded.java   
/**
 * Set the Logger for this component.
 *
 * @param logger The new logger
 */
public void setLogger(Logger logger) {

    Logger oldLogger = this.logger;
    this.logger = logger;
    support.firePropertyChange("logger", oldLogger, this.logger);

}
项目:jerrydog    文件:HostConfig.java   
/**
 * Log a message on the Logger associated with our Host (if any)
 *
 * @param message Message to be logged
 */
protected void log(String message) {

    Logger logger = null;
    if (host != null)
        logger = host.getLogger();
    if (logger != null)
        logger.log("HostConfig[" + host.getName() + "]: " + message);
    else
        System.out.println("HostConfig[" + host.getName() + "]: "
                           + message);

}