Examples of LoggerRepository


Examples of org.apache.log4j.spi.LoggerRepository

    Connection connection = null;

    try {
      Logger logger;
      LoggerRepository loggerRepository = parentDBReceiver
          .getLoggerRepository();
      connection = parentDBReceiver.connectionSource.getConnection();

      StringBuffer sql = new StringBuffer();
      sql.append("SELECT ");
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

      } else {
        plugin.setName(pluginName);
        getLogger().debug("plugin named as [" + pluginName + "]");
      }

      LoggerRepository repository = (LoggerRepository) ec.getObject(0);

      //
      //   cast may fail when using user supplied repository
      //
      ((LoggerRepositoryEx) repository).getPluginRegistry().addPlugin(plugin);
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

 
  public void begin(ExecutionContext ec, String name, Attributes attributes) {
    inError = false;
    //logger.debug("In begin method");

    LoggerRepository repository = (LoggerRepository) ec.getObject(0);
    root = repository.getRootLogger();

    getLogger().debug("Pushing root logger on stack");
    ec.pushObject(root);
  }
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

    if (
      (debugAttrib == null) || debugAttrib.equals("")
        || debugAttrib.equals("false") || debugAttrib.equals("null")) {
      getLogger().debug("Ignoring " + INTERNAL_DEBUG_ATTR + " attribute.");
    } else {
      LoggerRepository repository = (LoggerRepository) ec.getObject(0);
      ConfiguratorBase.attachTemporaryConsoleAppender(repository);
      getLogger().debug("Starting internal logs on console.");
      attachment = true;
    }
  }
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

  }

  public void end(ExecutionContext ec, String name) {
    if (attachment) {
      getLogger().debug("Will stop writing internal logs on console.");
      LoggerRepository repository = (LoggerRepository) ec.getObject(0);
      List errorList = ec.getErrorList();
      ConfiguratorBase.detachTemporaryConsoleAppender(repository, errorList);
    }
  }
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class RepositoryPropertyAction extends PropertyAction {
 
  public void setProperties(ExecutionContext ec, Properties props) {
    LoggerRepository repository = getLoggerRepository();
    if(repository == null) {
     
    }
    if (repository instanceof LoggerRepositoryEx) {
        ((LoggerRepositoryEx) repository).getProperties().putAll(props);
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

        ((LoggerRepositoryEx) repository).getProperties().putAll(props);
    }
  }
 
  public void setProperty(ExecutionContext ec, String key, String value) {
    LoggerRepository repository = getLoggerRepository();
    if (repository instanceof LoggerRepositoryEx) {
        ((LoggerRepositoryEx) repository).setProperty(key, value);
    }
  }
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

 
  public void begin(ExecutionContext ec, String name, Attributes attributes) {
    // Let us forget about previous errors (in this object)
    inError = false;

    LoggerRepository repository = (LoggerRepository) ec.getObject(0);

    // Create a new org.apache.log4j.Category object from the <category> element.
    String loggerName = attributes.getValue(NAME_ATTRIBUTE);

    if (Option.isEmpty(loggerName)) {
      inError = true;

      String line =
        ", around line " + getLineNumber(ec) + " column "
        + getColumnNumber(ec);

      String errorMsg = "No 'name' attribute in element " + name + line;

      getLogger().warn(errorMsg);
      ec.addError(new ErrorItem(errorMsg));

      return;
    }

    getLogger().debug("Logger name is [" + loggerName + "].");

    Logger l;

    String className = attributes.getValue(CLASS_ATTRIBUTE);

    if (Option.isEmpty(className)) {
      getLogger().debug("Retreiving an instance of org.apache.log4j.getLogger().");
      l = repository.getLogger(loggerName);
    } else {
      getLogger().debug("Desired logger sub-class: [" + className + ']');

      try {
        Class clazz = Loader.loadClass(className);
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

   
      layout = (Layout)
        OptionConverter.instantiateByClassName(
          className, org.apache.log4j.Layout.class, null);

      LoggerRepository repo = (LoggerRepository) ec.getObjectStack().get(0);
      layout.setLoggerRepository(repo);

      getLogger().debug("Pushing layout on top of the object stack.");
      ec.pushObject(layout);
    } catch (Exception oops) {
View Full Code Here

Examples of org.apache.log4j.spi.LoggerRepository

      getLogger().debug("About to instantiate appender of type [{}]", className);

      appender = (Appender) OptionConverter.instantiateByClassName(
          className, org.apache.log4j.Appender.class, null);

      LoggerRepository repo = (LoggerRepository) ec.getObjectStack().get(0);
      appender.setLoggerRepository(repo);

      String appenderName = attributes.getValue(NAME_ATTRIBUTE);

      if (Option.isEmpty(appenderName)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.