Package org.apache.log4j.rolling.helper

Examples of org.apache.log4j.rolling.helper.Action


      try {
        RolloverDescription rollover =
          rollingPolicy.initialize(getFile(), getAppend());

        if (rollover != null) {
          Action syncAction = rollover.getSynchronous();

          if (syncAction != null) {
            syncAction.execute();
          }

          setFile(rollover.getActiveFileName());
          setAppend(rollover.getAppend());
          lastRolloverAsyncAction = rollover.getAsynchronous();
View Full Code Here


      return rolloverDescription;
    }

    String activeFileName = rolloverDescription.getActiveFileName();
    boolean append = rolloverDescription.getAppend();
    Action synchronous = rolloverDescription.getSynchronous();
    final Action asynchronous = rolloverDescription.getAsynchronous();

    Action newAsynchronous = new ActionBase() {

      @Override
      public boolean execute() throws IOException {
        boolean success = true;
        if (asynchronous != null) {
View Full Code Here

    //
    if (newFileName.equals(lastFileName)) {
      return null;
    }

    Action renameAction = null;
    Action compressAction = null;
    String lastBaseName =
      lastFileName.substring(0, lastFileName.length() - suffixLength);
    String nextActiveFile =
      newFileName.substring(0, newFileName.length() - suffixLength);
View Full Code Here

      StringBuffer buf = new StringBuffer();
      formatFileName(new Integer(purgeStart), buf);

      String renameTo = buf.toString();
      String compressedName = renameTo;
      Action compressAction = null;

      if (renameTo.endsWith(".gz")) {
        renameTo = renameTo.substring(0, renameTo.length() - 3);
        compressAction =
          new GZCompressAction(
View Full Code Here

    //
    //   work renames backwards
    //
    for (int i = renames.size() - 1; i >= 0; i--) {
      Action action = (Action) renames.get(i);

      try {
        if (!action.execute()) {
          return false;
        }
      } catch (Exception ex) {
        LogLog.warn("Exception during purge in RollingFileAppender", ex);
View Full Code Here

    //
    if (newFileName.equals(lastFileName)) {
      return null;
    }

    Action renameAction = null;
    Action compressAction = null;
    String lastBaseName =
      lastFileName.substring(0, lastFileName.length() - suffixLength);
    String nextActiveFile =
      newFileName.substring(0, newFileName.length() - suffixLength);
View Full Code Here

      try {
        RolloverDescription rollover =
          rollingPolicy.initialize(getFile(), getAppend());

        if (rollover != null) {
          Action syncAction = rollover.getSynchronous();

          if (syncAction != null) {
            syncAction.execute();
          }

          setFile(rollover.getActiveFileName());
          setAppend(rollover.getAppend());
          lastRolloverAsyncAction = rollover.getAsynchronous();
View Full Code Here

      StringBuffer buf = new StringBuffer();
      formatFileName(new Integer(purgeStart), buf);

      String renameTo = buf.toString();
      String compressedName = renameTo;
      Action compressAction = null;

      if (renameTo.endsWith(".gz")) {
        renameTo = renameTo.substring(0, renameTo.length() - 3);
        compressAction =
          new GZCompressAction(
View Full Code Here

    //
    //   work renames backwards
    //
    for (int i = renames.size() - 1; i >= 0; i--) {
      Action action = (Action) renames.get(i);

      try {
        if (!action.execute()) {
          return false;
        }
      } catch (Exception ex) {
        getLogger().info("Exception during purge in RollingFileAppender", ex);
View Full Code Here

    //
    if (newFileName.equals(lastFileName)) {
      return null;
    }

    Action renameAction = null;
    Action compressAction = null;
    String lastBaseName =
      lastFileName.substring(0, lastFileName.length() - suffixLength);
    String nextActiveFile =
      newFileName.substring(0, newFileName.length() - suffixLength);
View Full Code Here

TOP

Related Classes of org.apache.log4j.rolling.helper.Action

Copyright © 2018 www.massapicom. 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.